Skip to main content
Glama
cmendezs

mcp-fattura-elettronica-it

Parse Fattura Semplificata Xml

parse_fattura_semplificata_xml

Parse simplified Italian e-invoice XML (FatturaSemplificata) into a structured dict to extract header, body, and invoice details for inspection or verification.

Instructions

Parse a FatturaSemplificata XML string into a structured Python dict.

Use this to inspect simplified invoices (TD07/TD08/TD09) received from counterparties or to verify output of generate_fattura_semplificata().

Extracts: versione, transmission data, seller identity and address, buyer fiscal identifiers and optional address, document type/date/number, all DatiBeniServizi entries, and DatiFatturaRettificata if present.

On success returns {'versione': str, 'header': {...}, 'body': {...}}. On error returns {'error': ''}.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
xml_stringYesFatturaSemplificata XML string to parse. Accepts VFSM10 format (namespace v1.0).

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Schema Changelog

Changes observed during successful MCP inspections.

  1. Addedv0.7.0

TDQS

A4.2/5.0
Behavior4/5

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

With no annotations, the description carries the behavioral disclosure burden and does so well: it documents the success return shape ('{'versione': str, 'header': {...}, 'body': {...}}') and the error shape ('{'error': '<reason>'}' ). It also discloses the scope of extraction, including optional DatiFatturaRettificata, but does not elaborate on edge cases such as malformed XML beyond returning an error dict or namespace handling beyond the schema note.

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 well-organized and front-loaded: purpose, usage context, extraction details, and return contract are each covered without redundancy. Every sentence adds useful information, and the list of extracted fields is concise yet informative.

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 parsing tool, the description is substantially complete: it explains what input is accepted, what will be extracted, and what success and error responses look like. The output schema is also present, and the description references a relevant sibling for verification. Minor gaps exist around explicit non-use cases and detailed malformed-input behavior, but these do not hinder correct invocation.

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%, and the xml_string parameter description already includes format and version details ('Accepts VFSM10 format (namespace v1.0)'). The tool description itself does not add further parameter semantics beyond what the schema provides, so the baseline of 3 is appropriate.

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 action and resource: 'Parse a FatturaSemplificata XML string into a structured Python dict.' It further distinguishes the tool by naming the simplified invoice types (TD07/TD08/TD09) and listing the exact data extracted, so an agent can differentiate it from siblings like parse_fattura_xml or 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 concrete usage guidance: 'Use this to inspect simplified invoices (TD07/TD08/TD09) received from counterparties or to verify output of generate_fattura_semplificata().' This clearly indicates when the tool is appropriate and even references a sibling generation tool for verification, though it does not explicitly state when to avoid it or name a direct alternative for full FatturaPA XML parsing.

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