Skip to main content
Glama

ApriFile

Read an Italian e-invoice

summarize_einvoice
Read-onlyIdempotent

Reads an Italian electronic invoice in FatturaPA XML format (.xml or .xml.p7m) and returns supplier, customer, document type, number and date, line items, VAT summary, totals, payment terms with IBAN and due dates, attachments, and a list of calculation problems that the SdI would reject (codes 00400, 00401, 00419, 00421, 00422, 00423, 00429, 00443). Use when the user shares an Italian e-invoice or asks what an invoice says or why it might be rejected.

Tool call template

This tool declares no required parameters. Add optional parameters from the input schema as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {},
    "name": "summarize_einvoice"
  }
}

Input Schema

NameRequiredDescriptionDefault
fileNoA file the user attached in the chat.
xml_textNoThe invoice XML as text.
content_base64NoThe invoice file (.xml or .xml.p7m) encoded in base64.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A4.1/5.0
Behavior4/5

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

Annotations already declare readOnlyHint, idempotentHint, destructiveHint=false and closed-world, so the safety profile is covered. The description adds real context beyond that: supported formats including the signed .p7m variant, the exact set of returned sections, and the specific SdI rejection codes it detects. It does not explain how to choose among the three input channels.

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?

Two sentences, front-loaded with the verb and resource, with return contents spelled out immediately. The eight-code enumeration is dense but earns its place by signalling rejection-detection capability; nothing else is padding.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness4/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

With no output schema, the description takes on the return-value burden and discharges it by listing the sections returned. For a read-only tool with fully described parameters, the only meaningful gap is the lack of guidance on selecting between the three optional input formats.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema coverage is 100%, so file, xml_text and content_base64 are already documented by the schema, which sets the baseline at 3. The description confirms the accepted formats (.xml / .xml.p7m) but does not state that exactly one of the three optional inputs should be supplied, which is the main ambiguity left for the caller.

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 (reads) and a precisely bounded resource: an Italian e-invoice in FatturaPA XML, .xml or .xml.p7m. The enumeration of returned content (supplier, customer, VAT summary, IBAN, SdI error codes) makes it unmistakably the parse/extract tool rather than a generic file reader.

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?

Gives explicit triggers: when the user shares an Italian e-invoice, asks what an invoice says, or asks why it might be rejected. It stops short of naming an alternative or an exclusion (e.g. when to prefer explain_sdi_notice for a rejection notice rather than an invoice), so routing between the two remains an inference.

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.

Resources