Skip to main content
Glama
cmendezs

mcp-fattura-elettronica-it

lookup_codice_destinatario

Validate the format of a CodiceDestinatario or PEC address to determine routing type before building transmission header.

Instructions

Validate the format of a CodiceDestinatario (SDI recipient code) or PEC address.

Call this before build_transmission_header() to confirm the recipient routing type and that the code or PEC address is correctly formatted. At least one of codice or pec must be provided.

Routing rules:

  • codice is 6 alphanumeric chars (e.g. 'ABC123') → routing_type: 'SDI_CODE'

  • codice is '0000000' (7 zeros) → routing_type: 'PEC'; pec_destinatario is then mandatory in build_transmission_header()

  • pec only (no codice) → validates email format, routing_type: 'PEC'

Limitation: performs format validation only — no live query against the SDI SOAP directory service (planned for a future release).

On success returns a dict with 'routing_type', 'codice_destinatario' and/or 'pec_destinatario', and a 'note' with usage guidance. On invalid input returns {'error': ''}.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
codiceNo6-character alphanumeric SDI CodiceDestinatario to look up. Special value '0000000' (7 zeros) indicates PEC routing.
pecNoPEC address to validate format (user@domain.ext). When a PEC is provided, CodiceDestinatario must be '0000000'.

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Behavior5/5

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

The description fully discloses that it performs only format validation, not a live query, and explains the return format for both success and error cases. Since no annotations are provided, the description carries the full burden, and it fulfills it completely.

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 well-structured with distinct sections for routing rules, limitations, and return values. Every sentence adds necessary information without redundancy.

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 moderate complexity and the presence of an output schema (implied by 'Has output schema: true'), the description provides all essential behavioral details, usage order, and parameter constraints, making it fully self-contained.

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?

The description adds substantial meaning beyond the schema: it explains the special value '0000000' and its routing implication, that pec is mandatory when codice is '0000000', and the expected format. Since schema coverage is 100%, the description elevates understanding.

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 validates the format of a CodiceDestinatario or PEC address, specifies routing rules, and mentions it should be called before build_transmission_header(). This distinguishes it from sibling tools like validate_fattura_xsd, which validate entire XML documents.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines5/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description explicitly says 'Call this before build_transmission_header()', specifies that at least one parameter must be provided, and explains the routing rules. This provides clear guidance on when and how to use the tool, with no ambiguity.

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