Skip to main content
Glama
cmendezs

mcp-fattura-elettronica-it

parse_ubl_invoice

Parse UBL 2.1 invoice XML into an EN 16931 structured dictionary for inspection or round-trip verification.

Instructions

Parse a UBL 2.1 invoice XML string into an EN 16931 structured dict.

Extracts the EN 16931 core field set. Italian national fields (progressivo_invio, regime_fiscale, etc.) are returned with their ItalianInvoice defaults since UBL 2.1 does not carry them.

Use this to inspect cross-border invoices received in UBL format, or to round-trip the output of generate_ubl_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_stringYesUBL 2.1 Invoice or CreditNote XML string to parse. Returns an EN 16931 field dict. National extensions are silently ignored.

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Behavior4/5

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

With no annotations, the description fully carries the transparency burden. It discloses the default behavior for Italian fields, the return format (JSON-serializable dict on success, error dict on failure), and the input scope. It could be improved by mentioning potential error types (e.g., invalid XML), but it's already quite transparent.

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 concise, with three well-structured sentences. The first sentence states the core purpose, the second clarifies behavior for national fields, the third provides usage guidance, and a final line specifies return format. No fluff or redundancy.

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?

Given the single parameter, the presence of an output schema (stated in context), and the clear separation from 25+ sibling tools, the description fully covers the tool's behavior and usage. It explains the special handling of Italian fields and the round-trip verification use case, leaving no obvious gaps.

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 single parameter 'xml_string' already has a schema description (100% coverage). The main description adds context about the input being a UBL 2.1 invoice XML string and the output, but the schema text already provides the same information. Thus, the description adds minimal extra value beyond the schema.

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 'Parse a UBL 2.1 invoice XML string into an EN 16931 structured dict', specifying the format and target schema. It distinguishes from sibling parsers (parse_cii_invoice, parse_fattura_xml) by focusing on UBL and EN 16931, and mentions handling of Italian national fields, providing unique context.

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?

Explicitly says 'Use this to inspect cross-border invoices received in UBL format, or to round-trip the output of generate_ubl_invoice() for verification.' This gives concrete when-to-use scenarios and implies when not to use (e.g., not for CII or FatturaPA), which are covered by sibling tools.

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

Install Server

Other Tools

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/cmendezs/mcp-fattura-elettronica-it'

If you have feedback or need assistance with the MCP directory API, please join our Discord server