Skip to main content
Glama
cmendezs

mcp-fattura-elettronica-it

Validate Partita Iva

validate_partita_iva

Validate an Italian Partita IVA for 11-digit format and official modulo-10 checksum before invoicing. Returns cleaned value or error reason.

Instructions

Validate an Italian Partita IVA for format (11 digits) and modulo-10 checksum.

Call this as an early sanity check on the seller's VAT number before passing it to validate_cedente_prestatore(). Strips whitespace before validation.

Applies the official Agenzia delle Entrate control algorithm: odd-position digits are taken as-is; even-position digits are doubled (subtract 9 if > 9); the last digit must equal (10 - sum % 10) % 10.

On success returns {'valid': true, 'value': ''}. On failure returns {'valid': false, 'value': '', 'error': ''}.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
partita_ivaYesItalian Partita IVA (VAT number) to validate. Must be exactly 11 digits. Whitespace is stripped before validation.

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.2.0

TDQS

A4.3/5.0
Behavior4/5

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

No annotations are provided, so the description carries the full burden. It discloses that whitespace is stripped, describes the official Agenzia delle Entrate algorithm in detail, and specifies the exact return format for success and failure. This goes beyond the schema and provides substantial behavioral transparency for a validation tool.

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 well-structured, front-loading the purpose, then usage, algorithm, and return format. It is moderately sized; the algorithm explanation is detailed but necessary for transparency. No redundant content; each sentence serves a purpose.

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?

Given the tool's moderate complexity (a validation algorithm) and the presence of a full input schema, the description is complete: it covers the algorithm, return format, and usage guidance. The output schema is not shown but the return format is explicitly described, so the agent knows what to expect. It also references the follow-up sibling, completing the workflow context.

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?

The input schema already provides full coverage of the parameter (100%), describing it as an Italian Partita IVA that must be exactly 11 digits and that whitespace is stripped. The description repeats the whitespace note but adds no new parameter-specific information beyond what the schema already states, so the baseline of 3 is appropriate.

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 the tool validates an Italian Partita IVA for format (11 digits) and modulo-10 checksum. It explicitly names the sibling validate_cedente_prestatore as the follow-up, distinguishing its role as an early sanity check. This differentiates it from validate_partita_iva_format (which likely only checks format) and other siblings.

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 instructs to call this as an early sanity check before passing to validate_cedente_prestatore(), providing a clear when-to-use directive and naming the alternative. It doesn't explicitly compare with validate_partita_iva_format, but the usage context is clear enough.

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