Skip to main content
Glama
cmendezs

mcp-fattura-elettronica-it

validate_cessionario

Validate Italian e-invoice buyer details (FatturaPA): checks company or personal names and tax IDs, returns a CessionarioCommittente block ready for XML, or lists clear errors.

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): routing to the Public Administration is via a 6-char IPA office CodiceDestinatario in build_transmission_header(), not via this tool — look up the code at https://www.indicepa.gov.it.

Gruppo IVA (VAT-group) buyers: when id_paese/id_codice are omitted and codice_fiscale is an 11-digit (company-format) code, this may be a VAT-group's own CF rather than a participating member's. SdI rejects that combination with scarto code 00327 (see mcp_fattura_elettronica_it.sdi.notifications. SCARTO_CODE_REFERENCE) — this tool cannot validate VAT-group membership offline, so it only warns on the detectable structural precondition (IdFiscaleIVA absent

  • 11-digit codice_fiscale); the returned 'warnings' list flags this case. Confirm codice_fiscale identifies the specific member company, not the group itself.

On success returns {'CessionarioCommittente': {...}} ready for generate_fattura_xml(), plus 'warnings' (list[str]) when the 00327 structural precondition is detected. On failure returns {'error': ''} listing all issues joined by '; '.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
capNoPostal code of the buyer.
nomeNoFirst name of the buyer (natural person).
comuneNoCity of the buyer.
cognomeNoLast name of the buyer (natural person).
nazioneNoISO country code of the buyer.IT
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.
indirizzoNoStreet address of the buyer.
denominazioneNoCompany name of the buyer. Mutually exclusive with nome+cognome.
codice_fiscaleNoItalian fiscal code (16-char alphanumeric for individuals, 11-digit numeric for companies). Alternative to IdFiscaleIVA.

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Behavior5/5

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

No annotations are provided, so the description must carry the full disclosure burden. It does so thoroughly: it explains the validation behavior, the scarto code 00327 risk, the fact that VAT-group membership cannot be validated offline, and what the function returns on both success and failure including the 'warnings' list.

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 long but every sentence carries real information: workflow position, validation rules, per-scenario guidance, the VAT-group warning, and the return contract. The most important usage-bearing content is front-loaded, and the edge-case caveats are deferred to the end where they belong.

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 10 parameters, no annotations, an output schema, and a large set of sibling tools, the description is remarkably complete. It covers when to call the tool, who the intended buyer types are, what validations happen, what cannot be validated, how warnings are produced, and the exact success/error return contract.

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

Parameters5/5

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

Even though schema description coverage is already 100%, the description adds significant cross-parameter semantics not derivable from the schema: denominazione mutual exclusivity with nome+cognome, the conditional requirement for id_codice/id_paese, the 11-digit codice fiscale VAT-group caveat, and the specific recommendation to leave id_paese/id_codice empty for Italian B2C buyers with a CodiceFiscale.

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 opens with a specific verb-resource pair: 'Validate and build the CessionarioCommittente (buyer) block for FatturaPA.' It then lists concrete validation rules (denominazione vs nome+cognome, tax-identifier requirements, id_codice/id_paese coupling), which clearly differentiates it from sibling tools like validate_cedente_prestatore and build_dati_generali.

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 slots the tool into the workflow: 'Use this as step 5 in the invoice generation workflow, after validate_cedente_prestatore() and before build_dati_generali().' It also gives concrete routing alternatives, such as B2G cases going through build_transmission_header() rather than this tool, and explains which parameter combinations apply to Italian B2C, foreign B2B, and VAT-group buyers.

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