Skip to main content
Glama
iMark21

AEAT MCP Server

by iMark21

validate_tax_id

Verify Spanish tax ID numbers (NIF, NIE, CIF) for individuals and companies using official algorithms. Returns validity, type, and formatted value.

Instructions

Validates a Spanish tax identification number. Supports NIF (individuals, 8 digits + letter), NIE (foreign residents, X/Y/Z + 7 digits + letter), and CIF (companies, letter + 7 digits + control). Returns validity, type detected, and formatted value. Source: Ministerio del Interior (NIF/NIE algorithm), Real Decreto 1065/2007 (CIF).

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
idYesTax ID to validate (NIF, NIE, or CIF)
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 of behavioral disclosure. It effectively describes the tool's behavior: it validates IDs, detects types, returns validity status, and formats values, and cites authoritative sources (Ministerio del Interior, Real Decreto). It does not mention error handling, rate limits, or authentication needs, but for a simple validation tool, this is reasonably comprehensive.

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 front-loaded with the core purpose, followed by specifics on supported types and return values, and ends with source citations. Every sentence adds value: the first states the action, the second details formats, the third outlines outputs, and the fourth provides authority. It is compact and well-structured without redundancy.

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 simplicity (one parameter, no output schema, no annotations), the description is fairly complete. It covers purpose, supported ID types, return values, and sources. However, it lacks details on output structure (e.g., what 'formatted value' means) and potential error responses, which could be helpful for an agent. For a low-complexity tool, this is adequate but not exhaustive.

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 schema description coverage is 100%, with the parameter 'id' documented as 'Tax ID to validate (NIF, NIE, or CIF)'. The description adds semantic context by detailing the supported formats (e.g., 8 digits + letter for NIF), which clarifies beyond the schema's generic mention. However, it does not explain validation rules or error cases, so it meets the baseline for high schema coverage.

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's purpose: validating Spanish tax IDs. It specifies the exact types supported (NIF, NIE, CIF) with details on their formats, distinguishing it from sibling tools that retrieve tax data rather than validate IDs. The verb 'validates' and resource 'Spanish tax identification number' are specific and unambiguous.

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 implies usage context by listing supported ID types, helping users know when to apply this tool for validation. However, it does not explicitly state when to use it versus alternatives (e.g., for Spanish tax IDs only) or mention any prerequisites, such as input format requirements beyond the schema. The context is clear but lacks explicit exclusions or comparisons.

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/iMark21/aeat-mcp'

If you have feedback or need assistance with the MCP directory API, please join our Discord server