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 schema v1.6.1, ensuring correct namespace, element structure, data types, and cardinality constraints. Returns validation results or errors.

Instructions

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

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.

Requires lxml to be installed and the bundled XSD schema file to be present (or FATTURA_XSD_PATH env var to point to it). Validates namespace, element structure, data types, and cardinality constraints.

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?

No annotations, so description carries full burden. It details prerequisites (lxml, XSD file), validation scope (namespace, structure, types, cardinality), and three return shapes (success, failure, setup error). Comprehensive and honest.

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?

Four sentences, no fluff. Purpose is first, then usage, prerequisites, return values. Every sentence earns its place.

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 one parameter, presence of output schema, and no annotations, the description is fully complete. It covers prerequisites, validation behavior, and all possible return structures.

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

Parameters4/5

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

Schema already has a detailed description of 'xml_string' (100% coverage). Description adds the crucial namespace requirement: 'Must include the FatturaElettronica root element with the correct namespace...' This adds 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?

Description clearly states 'Validate a FatturaPA XML string against the official Agenzia delle Entrate XSD v1.6.1.' The verb 'validate' and specific resource distinguish it from sibling tools like 'validate_partita_iva'.

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?

Explicit guidance: '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.' This provides clear when-to-use context.

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