Skip to main content
Glama
MaurizioLisanti

fatturapa-mcp-server

lookup_sdi_error

Look up any SDI error code to get its official description, category, and resolution hint from a local offline table.

Instructions

Look up an SDI error code and return its human-readable description.

Uses a local static table of official AdE error codes. No network call required.

Args: error_code: SDI error code string (e.g., "00001", "00002"). ctx: Optional MCP context for structured log emission.

Returns: A LookupResult with keys: code (str): The queried error code. description (str): Official Italian description. category (str): Error category (e.g., "STRUTTURA", "CONTENUTO"). resolution (str): Suggested resolution hint.

Raises: ValueError: If error_code is not found in the known error table.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
error_codeYes

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
codeYes
categoryYes
resolutionYes
descriptionYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.3.2

TDQS

A3.9/5.0
Behavior4/5

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

With no annotations provided, the description carries the full burden and does well: it discloses the local static data source, that no network call is required, the exact return keys, and that a ValueError is raised when the code is unknown. It stops short of details like case sensitivity or input format constraints, keeping it from a 5.

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?

The description is front-loaded with purpose and structured into Args, Returns, and Raises sections. It is somewhat verbose, and the Returns section partly duplicates what an output schema already provides, but the structure remains clear and useful.

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?

For a simple one-parameter lookup tool with no annotations and 0% schema description coverage, the description covers the essential behavior, return shape, and failure mode. Minor gaps around error-code formatting and the unexplained ctx parameter prevent a full 5.

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 description coverage is 0%, so the description must compensate. It does add meaning for error_code with examples ('00001', '00002'), but it omits format constraints such as exact digit length, and it mentions a 'ctx' parameter that does not appear in the input schema, creating ambiguity.

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 and resource: 'Look up an SDI error code and return its human-readable description.' This clearly distinguishes it from all invoice-processing siblings, which perform validation, extraction, or reporting rather than error-code resolution.

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

Usage Guidelines3/5

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

The description implies when to use it by specifying the SDI error-code lookup and noting it uses a local static table with no network call. However, it does not state when to prefer alternatives or when this tool would not apply, leaving usage context only implied.

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