Skip to main content
Glama
cmendezs

mcp-fattura-elettronica-it

add_allegato

Attach supporting documents (e.g., DDT, contract, PDF) to a FatturaPA invoice. Encodes file in base64 and returns attachment entry for XML generation.

Instructions

Build an Allegati (attachment) entry to include in a FatturaPA document.

Use this when you need to attach supporting documents (e.g. DDT, contract, PDF) to the invoice. Call once per file, collect results in a list, and pass it to generate_fattura_xml() as the allegati parameter.

attachment_base64 must be valid standard base64 (RFC 4648); the tool verifies decodability. nome_allegato must include the file extension (e.g. 'contract.pdf'). formato_allegato (e.g. 'PDF', 'XML', 'ZIP') is optional but recommended for recipients to identify the content without decoding.

On success returns {'Allegati': {'NomeAllegato', 'Attachment', 'size_bytes', ...}}. On failure returns {'error': ''} (invalid base64 or name > 60 chars).

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
nome_allegatoYesAttachment file name (NomeAllegato), max 60 chars. Include the extension (e.g. 'contract.pdf', 'ddt_001.pdf').
attachment_base64YesBase64-encoded content of the attachment. Any binary file is accepted; common formats: PDF, XML, JPG, ZIP.
formato_allegatoNoMIME type or format description (FormatoAllegato), max 10 chars. Examples: 'PDF', 'XML', 'ZIP'. Optional but recommended.
descrizione_allegatoNoShort description of the attachment content, max 100 chars. Optional.

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Behavior5/5

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

With no annotations, the description fully bears the burden of behavioral disclosure. It reveals key behaviors: 'attachment_base64 must be valid standard base64 (RFC 4648); the tool verifies decodability,' constraints on nome_allegato (max 60 chars, include extension), and the success/error return format. This is comprehensive for a non-destructive tool.

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 description is concise (about 120 words) and well-structured: first paragraph states purpose, second gives usage instructions, third details parameters, fourth describes return. Every sentence adds value without redundancy. It's front-loaded with the most critical information.

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?

The tool has 4 parameters (2 required), an output schema, and moderate complexity. The description covers all essential aspects: what it does, how to use it (including integration with generate_fattura_xml), parameter constraints, and return format. No obvious gaps. The output schema existence reduces need for return details, but description still provides a summary.

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 baseline is 3. The description adds significant value beyond the schema: it clarifies that attachment_base64 must be valid base64 per RFC 4648, that nome_allegato must include file extension, and that formato_allegato is optional but recommended. It also gives examples. This extra context warrants a 4.

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 it 'build an Allegati (attachment) entry to include in a FatturaPA document.' It specifies the verb 'build' and the resource 'Allegati entry', distinguishing it from sibling tools that handle other invoice components (e.g., add_linea_dettaglio, build_dati_generali). The purpose is unambiguous and specific.

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 explicitly says 'Use this when you need to attach supporting documents...' and instructs to 'Call once per file, collect results in a list, and pass it to generate_fattura_xml().' It provides clear context for when to use. However, it doesn't explicitly mention when not to use or name alternatives, which would be a minor improvement.

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