Skip to main content
Glama

Imperio — Italian Tax & Compliance Tools

FatturaPA: parse + verifica anti-frode del fornitore

parse_verify_fatturapa
Read-onlyIdempotent

Estrae i dati strutturati da un XML FatturaPA/SDI E, nella stessa chiamata, verifica anti-frode la parte indicata (default: il CEDENTE, cioè il fornitore che incassa il bonifico). I dati verificati NON sono inferiti da un LLM: P.IVA, Codice Fiscale, ragione sociale e IBAN di pagamento sono estratti deterministicamente dall'XML, poi passati ai controlli: IBAN (checksum MOD-97 + banca dal codice ABI), P.IVA e CF (checksum) e — quando il servizio UE è raggiungibile — la ragione sociale reale via VIES live, confrontata con quella dichiarata in fattura. Restituisce il parse completo più supplier_verification con verdetto (ok / attenzione / alto_rischio) e red flag puntuali; se la fattura riporta più IBAN distinti lo segnala e abbassa il verdetto. È la difesa contro la truffa del cambio-IBAN sulle fatture passive. Come verify_payee fa I/O esterno (una sola interrogazione VIES per chiamata, non una per riga): se VIES è giù o il budget condiviso è esaurito il verdetto degrada ONESTAMENTE ad "attenzione", mai a un falso "ok". Gratis (€0), nessun login. NON sostituisce la verifica out-of-band (telefonata al fornitore su un numero già noto).

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
partyNoParte da verificare: 'cedente' = fornitore/chi riceve il pagamento (default, il caso anti-frode); 'cessionario' = cliente. L'IBAN viene raccolto solo per il cedente, perché è lui che incassa.cedente
xml_contentYesIl contenuto XML della fattura elettronica (FatturaPA/SDI). Il .p7m va scompattato prima: qui si accetta XML testuale.
expected_countryNoPaese atteso del fornitore in ISO2. Se omesso vale il paese dichiarato dalla fattura stessa (sede del cedente), e solo in sua mancanza 'IT'. Un IBAN estero su un fornitore atteso italiano è il campanello #1 della frode.

TDQS

A4.6/5.0
Behavior5/5

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

Annotations already declare readOnlyHint, openWorldHint, and idempotentHint. The description goes well beyond this by disclosing: extraction is deterministic ('NON sono inferiti da un LLM'), external VIES call behavior with shared budget ('una sola interrogazione VIES per chiamata'), honest degradation to 'attenzione' when VIES is down or budget exhausted, and no login/free. It also explains the checks performed (IBAN MOD-97, P.IVA/CF checksum, VIES comparison). No contradictions with annotations.

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 long but front-loaded with the primary purpose and then systematically covers extraction, checks, return format, external I/O, cost, and a caveat. Every sentence contributes operational information (red flags, verdict values, budget constraints, out-of-band warning). It is appropriately structured for a complex tool, though slightly verbose.

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 no output schema, the description sufficiently covers return values ('Restituisce il parse completo più supplier_verification con verdetto (ok / attenzione / alto_rischio) e red flag puntuali'), input preprocessing (.p7m), failure modes, shared external I/O budget, and free/no-login access. This is complete for a tool with parsing and verification complexity.

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%, so the baseline is 3. The description adds meaningful context beyond the schema: it explains expected_country's fraud-flag role ('Un IBAN estero su un fornitore atteso italiano è il campanello #1 della frode'), clarifies that the default party 'cedente' is the supplier who receives payment, and notes that .p7m must be unpacked before passing xml_content. This elevates the value above the schema alone.

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 opens with a specific verb+resource: 'Estrae i dati strutturati da un XML FatturaPA/SDI E, nella stessa chiamata, verifica anti-frode la parte indicata' — clearly defining a combined parse-and-verify action. It distinguishes itself from siblings like parse_fatturapa (parse-only) and verify_payee by framing itself as 'la difesa contro la truffa del cambio-IBAN sulle fatture passive'.

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?

The description provides clear context for when to use the tool ('È la difesa contro la truffa del cambio-IBAN sulle fatture passive') and when not to rely on it exclusively ('NON sostituisce la verifica out-of-band (telefonata al fornitore su un numero già noto)'). It references verify_payee for comparison on external I/O but does not explicitly define alternatives like parse_fatturapa for parse-only needs, so it's clear but not fully exhaustive.

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

Try in Browser

Glama MCP Gateway

Add one secure layer between your agents and this server.

TDQS

A4.1/5.0
Disambiguation4/5

Tools are mostly distinct, targeting specific tax/compliance operations. The pair 'parse_fatturapa' and 'parse_verify_fatturapa' are similar but differentiated by the verification step. The detailed descriptions further reduce ambiguity.

Naming Consistency4/5

Names follow a consistent verb_noun pattern with prefixes like 'calc_', 'validate_', 'lookup_', 'parse_', 'nis2_', etc. Minor deviations exist (e.g., 'compose_f24' vs 'calc_forfettario', 'intrastat_compose' vs 'intrastat_periodicity') but overall the pattern is clear.

Tool Count3/5

With 23 tools, the set is on the heavier side for a single server, covering many subdomains of Italian tax and compliance. While each tool seems purposeful, the count exceeds the typical well-scoped range (3-15), making it slightly overwhelming.

Completeness4/5

The tool surface covers a wide array of Italian tax and compliance needs: tax calculations, F24 composition, INTRASTAT, ATECO, NIS2, FatturaPA, and validations. Minor gaps exist (e.g., no IRPEF or IRAP calculators), but the core tax workflows are well supported.

Resources