Skip to main content
Glama
cmendezs

mcp-fattura-elettronica-it

validate_fattura_xsd

Validates a FatturaPA XML string against the official Agenzia delle Entrate XSD v1.2.3, automatically selecting the correct schema for FPR12 (B2B/B2C) or FPA12 (B2G) format.

Instructions

Validate a FatturaPA XML string against the official Agenzia delle Entrate XSD v1.2.3.

Use this as step 11 — always call immediately after generate_fattura_xml() before storing or transmitting the document. Also use to verify third-party invoices received from suppliers.

Automatically selects the correct XSD based on the document's versione attribute: FPR12 (B2B/B2C) uses FatturaPA_FPR12_v1.2.3.xsd; FPA12 (B2G) uses FatturaPA_FPA12_v1.2.3.xsd. FATTURA_XSD_PATH env var overrides both.

Requires lxml. Validates namespace, element structure, data types, and cardinality.

On success returns {'valid': true, 'formato_trasmissione': 'FPR12'|'FPA12', 'errors': []}. On failure returns {'valid': false, 'errors': ['', ...]}. On setup error (missing lxml or XSD file) returns {'error': ''}.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
xml_stringYesComplete FatturaPA XML string to validate. Must include the FatturaElettronica root element with the correct namespace (http://ivaservizi.agenziaentrate.gov.it/docs/xsd/fatture/v1.2).

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Behavior5/5

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

Despite no annotations, the description comprehensively discloses behavior: automatic XSD selection based on versione attribute, environment variable override, requirement for lxml, validation scope (namespace, structure, types, cardinality), and detailed return value structures for success, failure, and setup errors.

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

Conciseness4/5

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

The description is well-structured with clear sections for purpose, usage, automatic behavior, requirements, and return values. It is slightly verbose but every sentence adds value, and the most important information is front-loaded.

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 that there is only one parameter with full schema coverage and an output schema exists, the description covers all necessary aspects: what it does, how it works, error handling, and prerequisites. No gaps remain.

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 has 100% schema coverage describing it as a complete FatturaPA XML string. The description adds a reminder about the root element and namespace, but does not provide significantly new meaning beyond the schema. Baseline 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 clearly states the tool validates a FatturaPA XML string against the official Agenzia delle Entrate XSD v1.2.3. It specifies the exact resource and action, and distinguishes from sibling validation tools by focusing on full-document XSD validation rather than specific fields.

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 instructs to use as step 11 immediately after generate_fattura_xml() and also for verifying third-party invoices. This provides clear when-to-use guidance and also implies not to use it for partial validation, which is handled 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