Skip to main content
Glama
cmendezs

mcp-fattura-elettronica-it

Generate Cii Invoice

generate_cii_invoice

Generate a CII CrossIndustryInvoice XML (UN/CEFACT D16B) from Italian invoice data for Factur-X or ZUGFeRD-compatible output. Use for embedded XML, not for FatturaPA/SdI submission.

Instructions

Generate a CII CrossIndustryInvoice XML document from an ItalianInvoice dict.

Use this when a CII (UN/CEFACT) wire format is required — for example, for Factur-X embedded XML or ZUGFeRD-compatible output. This tool does NOT produce FatturaPA XML; use generate_fattura_xml() for SdI submission.

Italian national fields are accepted but not emitted (same policy as generate_ubl_invoice).

On success returns {'xml': str, 'length_bytes': int, 'format': 'CII-D16B'}. On validation error returns {'error': str, 'details': list[str]}. On unexpected error returns {'error': str}.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
invoice_dataYesItalianInvoice-compatible dict to serialise to CII XML (UN/CEFACT CrossIndustryInvoice D16B). Same field requirements as generate_ubl_invoice(). profile (BT-24) for Factur-X / ZUGFeRD-compatible output: 'urn:cen.eu:en16931:2017#conformant#urn:factur-x.eu:1p0:extended' (Extended) or 'urn:cen.eu:en16931:2017' (EN 16931 core). [Inference: profile URN for FatturaPA extended via CII not yet standardised; verify with AdE before production use.]

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Schema Changelog

Changes observed during successful MCP inspections.

  1. Addedv0.2.5

TDQS

A4.5/5.0
Behavior4/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

With no annotations, the description carries the full burden. It discloses key behaviors: Italian national fields are accepted but not emitted (with a reference to the same policy as generate_ubl_invoice), and it specifies the return structure on success, validation error, and unexpected error. This goes beyond a simple mutation indication, though it does not mention idempotency or any side effects, which are likely negligible for a generation tool.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is tightly structured with front-loaded purpose, then usage, exclusion, policy, and return values. Every sentence serves a distinct role, and there is no filler. It is as concise as possible while conveying necessary information.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness5/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

For a generation tool with a nested object parameter and output schema, the description covers all essential aspects: the input format, the specific wire format, the exclusion of FatturaPA, the handling of Italian fields, and the return/error contract. It references generate_ubl_invoice for field requirements, which completes the picture without redundancy. Nothing an agent needs to correctly invoke this tool is missing.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

The input schema already has a detailed description for invoice_data, covering field requirements and profile URNs, so schema_description_coverage is 100%. The tool description itself adds little beyond what the schema already states: it says 'from an ItalianInvoice dict' and 'same policy as generate_ubl_invoice', which largely duplicates the schema's text. The baseline for high coverage is 3, and the tool description does not meaningfully enhance parameter understanding.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states a specific verb and resource: 'Generate a CII CrossIndustryInvoice XML document from an ItalianInvoice dict.' It distinguishes itself from generate_fattura_xml by explicitly noting it does NOT produce FatturaPA XML, and references generate_ubl_invoice for policy alignment. This makes the tool's purpose unambiguous even without opening the schema.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines5/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description provides a clear usage context: 'Use this when a CII (UN/CEFACT) wire format is required — for example, for Factur-X embedded XML or ZUGFeRD-compatible output.' It also states an explicit exclusion with an alternative: 'This tool does NOT produce FatturaPA XML; use generate_fattura_xml() for SdI submission.' This is an ideal when/when-not pair.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.