Skip to main content
Glama
cmendezs

mcp-fattura-elettronica-it

export_to_json

Convert a parsed FatturaPA invoice dictionary into a clean, indented JSON string. Control indentation level and omit empty fields to reduce noise.

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
parsed_fatturaYesParsed FatturaPA dict as returned by parse_fattura_xml(). Will be serialised to a clean, indented JSON string.
indentNoJSON indentation level (0–8 spaces). Default 2.
include_emptyNoInclude fields with null/empty values in output. Default False.

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Behavior5/5

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

Despite no annotations, the description fully discloses behavior: 'Always succeeds', default omission of null fields, and return structure. It explains what the tool does and guarantees success, which is critical.

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 with 7 sentences, each sentence adds necessary info without redundancy. Front-loaded with purpose and context, then parameter details.

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 the tool's simplicity and existence of output schema, the description is complete. It covers the tool's role in the pipeline, parameters, behavior, and return type, leaving no ambiguity.

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

Parameters5/5

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

Schema coverage is 100%, but the description adds meaning beyond the schema: for 'indent', it clarifies '0 = compact, 2 = standard readable, 4 = wide'; for 'include_empty', it elaborates on retaining keys; for 'parsed_fattura', it specifies origin from parse_fattura_xml().

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 serializes a parsed FatturaPA dict to a JSON string. It distinguishes from sibling tools like parse_fattura_xml, which parse XML, and generate_fattura_xml, which generates XML. The verb 'serialize' and resource are 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?

Explicitly says 'call this after parse_fattura_xml() when you need a human-readable or machine-transferable representation', providing clear when-to-use context. It doesn't specify when not to use, but the context is sufficient.

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