Skip to main content
Glama
cmendezs

mcp-fattura-elettronica-it

Export To Json

export_to_json

Serialize parsed FatturaPA invoices into readable JSON strings. Control indentation and empty-field inclusion for clean, transferable output.

Instructions

Serialize a parsed FatturaPA dict to a clean, indented JSON string.

Call this after parse_fattura_xml() when you need a human-readable or machine-transferable representation of the invoice. By default, null/empty fields are omitted (include_empty=False) to reduce noise in the output.

indent controls JSON indentation (0 = compact, 2 = standard readable, 4 = wide). include_empty=True retains all keys even when their value is null or empty string.

Always succeeds. Returns {'json_string': str, 'size_chars': int}.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
indentNoJSON indentation level (0–8 spaces). Default 2.
include_emptyNoInclude fields with null/empty values in output. Default False.
parsed_fatturaYesParsed FatturaPA dict as returned by parse_fattura_xml(). Will be serialised to a clean, indented JSON string.

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.2.0

TDQS

A4.5/5.0
Behavior4/5

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

With no annotations, the description carries the full behavioral burden. It discloses default behaviors (null/empty fields omitted), the effect of include_empty, the meaning of indent values, and even guarantees 'Always succeeds.' It also states the exact return shape, giving the agent strong expectations beyond the schema.

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 compact yet information-dense, with no filler. It front-loads the core purpose, then logically covers sequencing, parameter behavior, and return value. Every sentence adds useful operational detail, and the length is appropriate for a three-parameter serialization tool.

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 description fully covers what the agent needs to call the tool correctly: when to use it, what input it expects, how each parameter behaves, and what it returns. The explicit 'Always succeeds' note removes ambiguity about failure modes. Despite lacking annotations, the description is self-sufficient and complete.

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, but the description adds meaningful context: it explains why null/empty fields are omitted by default, gives concrete indent examples (0=compact, 2=standard, 4=wide), and clarifies how include_empty changes output. This enriches interpretation beyond the schema's short field descriptions.

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 and resource: 'Serialize a parsed FatturaPA dict to a clean, indented JSON string.' This clearly distinguishes the tool from XML-generation and parsing siblings such as generate_fattura_xml and parse_fattura_xml. The purpose is unambiguous and immediately actionable.

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 instructs when to call the tool: 'Call this after parse_fattura_xml() when you need a human-readable or machine-transferable representation of the invoice.' This provides clear sequencing and context, though it does not explicitly mention when-not-to-use it or name alternative serialization tools.

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