Skip to main content
Glama
cmendezs

mcp-fattura-elettronica-it

validate_cessionario

Validate and build the buyer block for Italian e-invoices. Ensures correct tax identifiers and IPA office code for public administration invoices.

Instructions

Validate and build the CessionarioCommittente (buyer) block for FatturaPA.

Use this as step 5 in the invoice generation workflow, after validate_cedente_prestatore() and before build_dati_generali().

Validates: either denominazione or both nome+cognome must be provided (mutually exclusive); at least one tax identifier (id_codice with id_paese, or codice_fiscale) is required; id_codice requires id_paese to be set.

Italian B2C buyers with only a CodiceFiscale: set codice_fiscale and leave id_paese/id_codice empty. Foreign B2B buyers: set id_paese + id_codice. For B2G invoices (FPA12): codice_ufficio is required — the 6-char IPA office code from https://www.indicepa.gov.it. Absence causes SdI routing rejection.

On success returns {'CessionarioCommittente': {...}} ready for generate_fattura_xml(). On failure returns {'error': ''} listing all issues joined by '; '.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
denominazioneNoCompany name of the buyer. Mutually exclusive with nome+cognome.
nomeNoFirst name of the buyer (natural person).
cognomeNoLast name of the buyer (natural person).
id_paeseNoISO country code for IdFiscaleIVA. Required for VAT-registered buyers. Omit for Italian buyers identified only by CodiceFiscale.
id_codiceNoVAT number of the buyer. Required if id_paese is provided.
codice_fiscaleNoItalian fiscal code (16-char alphanumeric for individuals, 11-digit numeric for companies). Alternative to IdFiscaleIVA.
indirizzoNoStreet address of the buyer.
capNoPostal code of the buyer.
comuneNoCity of the buyer.
nazioneNoISO country code of the buyer.IT
codice_ufficioNoIPA office code (CodiceUfficio) for B2G invoices (FPA12 format). Required for all invoices addressed to a Public Administration (PA). 6-character code from the IPA registry (https://www.indicepa.gov.it). Absence causes SdI routing rejection for FPA12 invoices.

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 carries full burden. It discloses validation rules (mutual exclusivity of denominazione vs nome+cognome, requirement for tax identifiers, id_codice requiring id_paese, and B2G requirement for codice_ufficio). It also states return format on success and failure. It could mention idempotency but is thorough. Score 4 due to minor missing details (e.g., no mention of side effects or idempotency), but still very good.

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 (about 150 words) and front-loaded with purpose and workflow position. It uses bullet points and clear sections for validation rules and conditional use cases. Every sentence adds value without 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 11 parameters, a full set of validation rules, and an output schema, the description covers all necessary context: return format (success/error objects), workflow integration, and all validation constraints. The presence of an output schema reduces the need to describe return structure, but the description still summarizes it clearly.

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 coverage is 100%, so baseline is 3. The description adds value by explaining mutual exclusivity and conditional relationships (e.g., id_codice requires id_paese), which are not in schema descriptions. However, schema descriptions are already clear, so the description adds moderate additional semantics.

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 and builds the CessionarioCommittente block for FatturaPA. It specifies the verb 'Validate and build' and the resource 'CessionarioCommittente (buyer) block'. The description distinguishes from siblings by positioning as step 5 in the workflow, which is unique among the sibling tools.

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?

The description explicitly states when to use it: 'Use this as step 5 in the invoice generation workflow, after validate_cedente_prestatore() and before build_dati_generali().' It also provides conditional usage guidelines for different buyer scenarios: Italian B2C, foreign B2B, and B2G (FPA12). This helps the agent decide when to set specific parameters.

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