Skip to main content
Glama
cmendezs

mcp-fattura-elettronica-it

generate_ubl_invoice

Generate a standard UBL 2.1 invoice XML from Italian invoice data for cross-border B2B or Peppol-routed documents.

Instructions

Generate a UBL 2.1 Invoice XML document from an ItalianInvoice dict.

Use this for cross-border B2B invoices or Peppol-routed documents. This tool does NOT produce FatturaPA XML; use generate_fattura_xml() for SdI submission.

Italian national fields (progressivo_invio, codice_destinatario, regime_fiscale) are accepted in the input dict but are not emitted in the UBL output — they belong in the FatturaPA DatiTrasmissione header.

profile (BT-24) should be the Peppol BIS Billing 3.0 customisation ID ('urn:cen.eu:en16931:2017#compliant#urn:fdc:peppol.eu:2017:poacc:billing:3.0') or the EN 16931 core profile ('urn:cen.eu:en16931:2017') for non-Peppol use. [Inference: FatturaPA-specific CIUS URN not yet standardised for UBL; verify with AdE if UBL submission to an IT-specific platform is intended.]

On success returns {'xml': str, 'length_bytes': int, 'format': 'UBL-2.1'}. On validation error returns {'error': str, 'details': list[str]}. On unexpected error returns {'error': str}.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
invoice_dataYesItalianInvoice-compatible dict to serialise to UBL 2.1 XML. Required top-level fields: profile (str, BT-24 customisation ID), invoice_number (str), invoice_date (ISO 8601 date string), invoice_type_code (str, '380' invoice / '381' credit note), currency_code (str, 'EUR'), seller (dict with name, address), buyer (dict with name, address), line_items (list of line dicts), tax_lines (list of tax dicts), sum_of_line_net_amounts, tax_exclusive_amount, tax_total, tax_inclusive_amount, amount_due (all Decimal-compatible strings or numbers). Optional: note, buyer_reference, payment_means, due_date, progressivo_invio, codice_destinatario, regime_fiscale. address fields: line_one, city, postcode, country_code (2-char ISO). party fields: name (str), vat_id (optional, with country prefix, e.g. 'IT01234567890'). line fields: line_id, name, quantity, unit_code, unit_price, line_net_amount, tax_category (UNCL5305, e.g. 'S'), tax_rate (%, e.g. 22). tax fields: category, rate, taxable_amount, tax_amount.

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Behavior5/5

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

No annotations provided, so description carries full burden. It describes output structure (success and error formats), notes that Italian fields are accepted but not emitted, and includes a caution about profile URN standardisation.

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?

Well-structured and front-loaded, but slightly verbose with the inference note. Still every sentence adds value, and the structure is logical (purpose, usage, parameter details, return values).

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 the complexity (one parameter with many nested fields) and presence of an output schema, the description covers input structure, output format, error handling, and usage boundaries, making it fully self-contained for an agent.

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?

Schema description coverage is 100% already, but the tool description and schema description add significant context: required vs optional fields, nested structures, example values for profile, address, party, line, and tax fields, and mentions of validation errors.

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 generates a UBL 2.1 Invoice XML from an ItalianInvoice dict, specifies the use case (cross-border B2B or Peppol-routed), and explicitly distinguishes from the sibling generate_fattura_xml for SdI submission.

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?

Provides explicit when-to-use (cross-border/Peppol) and when-not-to-use (SdI, use generate_fattura_xml), describes the behavior for Italian national fields, and gives guidance on the profile parameter with specific examples.

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