Skip to main content
Glama
cmendezs

mcp-fattura-elettronica-it

build_transmission_header

Construct the required DatiTrasmissione header block for Italian e-invoices (FatturaPA). Validates transmission format and recipient codes, returning the block or an error to prevent invalid XML generation.

Instructions

Build the DatiTrasmissione block required in every FatturaPA header.

Use this as step 3 in the invoice generation workflow, after generate_progressivo_invio() and before validate_cedente_prestatore(). Use lookup_codice_destinatario() first to confirm the recipient code format.

Validates: formato_trasmissione must be 'FPA12' or 'FPR12'; progressivo_invio must be 1–10 alphanumeric characters; pec_destinatario is required when codice_destinatario is '0000000'.

On success returns {'DatiTrasmissione': {...}} ready to pass to generate_fattura_xml(). On failure returns {'error': ''} — do not proceed to XML generation.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
id_paeseYesTwo-letter ISO 3166-1 country code of the transmitter (e.g. 'IT'). Usually 'IT' for Italian entities.
id_codiceYesTax identifier of the transmitter: Partita IVA (11 digits) for Italian entities, or foreign tax ID (max 28 chars) for cross-border.
progressivo_invioYesUnique sequential send identifier, max 10 alphanumeric characters. Use generate_progressivo_invio() to obtain one automatically.
formato_trasmissioneYesTransmission format: 'FPA12' for invoices to Public Administration (PA), 'FPR12' for invoices to private parties (B2B / B2C).
codice_destinatarioYesSDI recipient code: 6-char for PA offices (IPA code, FPA12), 7-char for B2B intermediaries (FPR12), or '0000000' (7 zeros) for PEC routing. Use lookup_codice_destinatario() to validate the code first.
pec_destinatarioNoPEC (certified email) address of the recipient. Required only when codice_destinatario is '0000000'.

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 carries full burden. It discloses validation rules for parameters (e.g., formato_trasmissione must be FPA12/FPR12), and describes both success and failure return values. No contradictions.

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, starting with the main purpose, then workflow placement, then validation details. Every sentence adds useful information, though slightly verbose for a simple block builder.

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 6 parameters (5 required), no annotations, but has output schema, the description fully explains validation rules, workflow integration, and error handling. It tells the agent what to do with the result (pass to generate_fattura_xml), making it complete.

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 coverage is 100% (baseline 3), but description adds value by specifying that progressivo_invio should be obtained via generate_progressivo_invio() and that lookup_codice_destinatario() should be used to validate codice_destinatario. This extra guidance improves semantic understanding.

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 it builds the DatiTrasmissione block, a required header in FatturaPA, and specifies its exact position in the invoice generation workflow (step 3). It distinguishes itself from sibling tools by referencing its predecessors and successors.

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 when to use: after generate_progressivo_invio and before validate_cedente_prestatore. Recommends using lookup_codice_destinatario first. Provides validation conditions and error handling guidance, making it clear when to proceed or stop.

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