Skip to main content
Glama
cmendezs

mcp-fattura-elettronica-it

build_dati_pagamento

Construct payment terms block for Italian electronic invoices. Validates conditions, method, IBAN, and due date per FatturaPA specifications.

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?

With no annotations, description covers validation behavior, success/error return, and that the block is optional; no side effects or destructive actions. Lacks explicit mention of idempotency or concurrency impacts.

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?

Well-structured with bullet points under parameter explanations; every sentence provides value without redundancy; front-loaded with purpose and workflow step.

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?

Covers workflow position, parameter relationships, validation, and success/error response; given 6 params and no output schema needed, it is fully sufficient for correct use.

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?

Adds significant context beyond schema: explains relationship between importo_pagamento and totale_fattura, IBAN requirement for MP05, data_scadenza omission for immediate payment, and validation rules for codes and formats.

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?

Clearly states it builds the DatiPagamento block for FatturaElettronicaBody, positions it as step 9 in the workflow, and distinguishes from siblings like build_dati_generali and compute_totali.

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?

Explicitly states when to use (step 9, after compute_totali, before generate_fattura_xml) and mentions optionality but recommendation for B2B. Does not explicitly list when not to use, but workflow context is clear.

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