Skip to main content
Glama
cmendezs

mcp-fattura-elettronica-it

Parse Cii Invoice

parse_cii_invoice

Parses a CII CrossIndustryInvoice XML into an EN 16931 structured dictionary. Use it to inspect Factur-X/ZUGFeRD invoices or verify round-tripped generate_cii_invoice output.

Instructions

Parse a CII CrossIndustryInvoice XML string into an EN 16931 structured dict.

Extracts the EN 16931 core field set. Italian national fields are returned with their ItalianInvoice defaults since CII does not carry them.

Use this to inspect Factur-X / ZUGFeRD invoices, or to round-trip the output of generate_cii_invoice() for verification.

On success returns the ItalianInvoice fields as a JSON-serialisable dict. On failure returns {'error': str}.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
xml_stringYesCII CrossIndustryInvoice XML string to parse. Returns an EN 16931 field dict. National extensions are silently ignored.

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Schema Changelog

Changes observed during successful MCP inspections.

  1. Addedv0.2.5

TDQS

A4.2/5.0
Behavior4/5

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

With no annotations provided, the description carries the full burden of behavioral disclosure. It discloses that Italian national fields are returned with defaults, that national extensions are silently ignored, and that failure returns {'error': str}. This is meaningful behavioral context beyond the schema. It could add more about side effects (none expected) or exact error conditions, but the disclosed behaviors are valuable.

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 compact and front-loaded: the core action and output format appear in the first sentence, followed by the Italian-field caveat, use cases, and return behavior. Every sentence earns its place, and there is no redundant restating of the tool name or title.

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

Completeness4/5

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

For a single-parameter parse tool with an output schema, the description is nearly complete. It covers input, output shape, failure mode, and a key behavioral caveat (Italian defaults). It does not explicitly state that the operation is read-only, but parsing is inherently non-mutating and no annotations suggest otherwise. The only minor gap is not describing the output schema's structure, but the output schema exists and the description says it returns a JSON-serialisable dict.

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?

Schema description coverage is 100%, so the schema already documents the single parameter. The description adds context about the parameter's purpose ('CII CrossIndustryInvoice XML string to parse') and the fact that national extensions are ignored, but it does not add format details (e.g., encoding, size limits). Baseline 3 is appropriate when the schema does the heavy lifting.

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 states a specific verb ('Parse'), a precise resource ('CII CrossIndustryInvoice XML string'), and the output format ('EN 16931 structured dict'). It also distinguishes itself from siblings by naming the Factur-X / ZUGFeRD use case and explicitly referencing generate_cii_invoice() for round-trip verification, which separates it from parse_fattura_xml and parse_ubl_invoice.

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

Usage Guidelines4/5

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

The description gives clear context for when to use the tool: 'Use this to inspect Factur-X / ZUGFeRD invoices, or to round-trip the output of generate_cii_invoice() for verification.' It does not explicitly name alternatives to avoid, but the use cases are specific enough that an agent can infer when this tool is appropriate versus sibling parsers.

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