Skip to main content
Glama
cmendezs

mcp-fattura-elettronica-it

build_dati_pagamento

Construct the DatiPagamento (payment details) block for Italian electronic invoices. Validates payment terms, method, IBAN, and returns structured data for XML generation.

Instructions

Build the DatiPagamento block for the FatturaElettronicaBody.

Use this as step 9 in the invoice generation workflow, after compute_totali() and before generate_fattura_xml(). The block is optional in the XML but strongly recommended for B2B invoices.

condizioni_pagamento: TP01 = instalments, TP02 = single full payment, TP03 = advance. modalita_pagamento: MP05 (bank transfer) is most common for B2B; include iban when using MP05. importo_pagamento: for TP02 this should equal totale_fattura from compute_totali(); for TP01 (instalments) call this tool once per instalment tranche.

Validates: condizioni_pagamento in {TP01, TP02, TP03}; modalita_pagamento in MP01–MP23; IBAN format (letters + digits, max 34 chars); data_scadenza_pagamento is YYYY-MM-DD.

On success returns {'DatiPagamento': {...}} ready for generate_fattura_xml(). On failure returns {'error': ''}.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
condizioni_pagamentoYesPayment terms code: 'TP01' = full payment in instalments, 'TP02' = full single payment, 'TP03' = advance payment.
modalita_pagamentoYesPayment method code MP01–MP23. Common values: MP05 (bonifico/bank transfer), MP01 (cash), MP08 (card), MP19/MP20/MP21 (SEPA direct debit), MP23 (PagoPA). Use a valid MP code from the FatturaPA reference.
importo_pagamentoYesPayment amount (may equal or differ from invoice total for instalments).
data_scadenza_pagamentoNoPayment due date (YYYY-MM-DD). Omit for immediate payment.
ibanNoIBAN for bank transfer (MP05). Validated for format (letters+digits, max 34 chars).
istituto_finanziarioNoName of the financial institution (bank name). Optional.

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Behavior4/5

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

Without annotations, description fully discloses validation rules (conditions, modalita, IBAN, date format), output format on success and failure. It does not mention state changes, permissions, or side effects, but as a build function it is implicitly stateless.

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?

Description is structured with a clear purpose statement, workflow placement, parameter guidance, validation, and return info. It is slightly verbose but each sentence adds value. Would benefit from bulleted lists for readability, but overall well-organized.

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?

With 6 parameters (3 required), no annotations, and an output schema present, the description is highly complete. It explains workflow integration, parameter semantics, validation, and return values. The output is described as a dict ready for the next step, which is sufficient given the output schema.

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?

Input schema covers all 6 parameters with descriptions (100% coverage). Description adds behavioral context beyond schema: explains how importo_pagamento relates to totale_fattura for TP02, calls for instalments, and IBAN requirement for MP05.

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 states it builds the 'DatiPagamento' block for FatturaElettronicaBody, specifies it as step 9 in the invoice generation workflow, and distinguishes from sibling tools like build_dati_generali by placing it after compute_totali and before generate_fattura_xml.

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 gives usage context: step 9 after compute_totali and before generate_fattura_xml, optional but recommended for B2B. Provides detailed guidance for different payment conditions (TP01, TP02, TP03) and when to include IBAN. Effectively tells when and how to use versus alternatives.

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