Skip to main content
Glama
cmendezs

mcp-fattura-elettronica-it

Get Sdi Filename

get_sdi_filename

Generate the official SDI filename for FatturaPA documents, formatting partita IVA and progressivo as IT{PartitaIVA}_{ProgressivoInvio}.xml with zero-padding for short numeric progressivi.

Instructions

Generate the canonical SDI filename for a FatturaPA document.

Use this when you need the official filename independently of generate_fattura_xml() (which also produces the filename). The SDI specification requires the format: IT{PartitaIVA}_{ProgressivoInvio}.xml, e.g. IT01234567890_00001.xml.

Validates: partita_iva_cedente must be exactly 11 digits; progressivo_invio must be 1–10 alphanumeric characters. Purely numeric progressivo shorter than 5 digits is zero-padded to 5 digits (e.g. '1' → '00001').

On success returns {'filename': str, 'partita_iva': str, 'progressivo_invio': str, 'length': int}. On failure returns {'error': ''}.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
progressivo_invioYesProgressivoInvio used in DatiTrasmissione — max 10 alphanumeric chars. Zero-padded to 5 digits if purely numeric and shorter than 5 chars.
partita_iva_cedenteYesPartita IVA of the sender (CedentePrestatore) — 11 digits, without prefix. The SDI prepends 'IT' automatically.

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.2.0

TDQS

A4.9/5.0
Behavior5/5

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

With no annotations provided, the description discloses the key behaviors itself: required validation rules for both parameters, the zero-padding behavior for short numeric progressivi, and the precise success/error return shapes.

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 most important facts (what it does, when to use it, format) lead, followed by validation rules and return shape. No filler or redundancy that adds noise.

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 purpose, usage context, parameters, validation behavior, and both success/error return shapes. There is no ambiguity about inputs, outputs, or edge cases, and the sibling tool set offers no competing filename-format utility.

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?

The schema already documents both parameters well (100% coverage), so the description mostly repeats that info. However, it adds the canonical filename template (IT{PartitaIVA}_{ProgressivoInvio}.xml) and a concrete example, which are useful beyond the schema.

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?

States a specific verb ('generate'), a specific resource (canonical SDI filename), and the exact format with an example. Clearly distinguishes from generate_fattura_xml() by noting this is for the filename alone.

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 says when to use it ('when you need the official filename independently of generate_fattura_xml()') and names the alternative. Also states the exact naming convention, so an agent knows exactly when this tool applies.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.