Skip to main content
Glama

validate_nif_es

Read-onlyIdempotent

Validates Spanish tax identification numbers — NIF (DNI, 8 digits + check letter, for Spanish citizens), NIE (Número de Identidad de Extranjero, starts with X/Y/Z, for foreign residents), and CIF (Código de Identificación Fiscal, letter + 7 digits + control, for companies). Automatically detects the document type. Returns { valid: boolean, type: 'NIF'|'NIE'|'CIF', id: string }. Use when processing Spanish invoices, e-commerce orders, supplier registrations, or any document requiring a verified Spanish fiscal identifier.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
idYesSpanish NIF, NIE or CIF with or without spaces. Examples: '12345678Z' (NIF), 'X1234567L' (NIE), 'B12345678' (CIF)

TDQS

A4.5/5.0
Behavior4/5

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

Annotations already declare readOnlyHint and idempotentHint, so the safe read-only nature is known. The description adds behavioral context beyond annotations by specifying the return format ({ valid, type, id }) and the automatic document-type detection, which clarifies how the tool behaves on various inputs. No contradiction with annotations.

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 three focused sentences: purpose and type formats, return behavior, and usage context. Information is front-loaded and every sentence earns its place with no filler or 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?

With a single parameter and no output schema, the description covers the full behavior: accepted document types, auto-detection, return format, and concrete use cases. The schema provides input formatting details (e.g., spaces), so nothing essential is missing.

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

Parameters4/5

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

The schema covers the 'id' parameter with examples at 100% coverage, so baseline is 3. The description enhances parameter understanding by explaining the NIF/NIE/CIF structures and stating that the tool automatically detects the type, which helps the agent understand the valid input space beyond the schema's raw examples.

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 opens with a clear verb and resource: 'Validates Spanish tax identification numbers' and explicitly enumerates the three document types (NIF, NIE, CIF) with format details. This distinguishes it from sibling tools like validate_nif and validate_iban, making its scope 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?

It provides a direct 'Use when' clause with concrete contexts: 'processing Spanish invoices, e-commerce orders, supplier registrations, or any document requiring a verified Spanish fiscal identifier.' However, it does not explicitly name when not to use it or mention alternatives, so it stops short of full 5.

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

Try in Browser

Glama MCP Gateway

Add one secure layer between your agents and this server.

TDQS

A4.4/5.0
Disambiguation5/5

Each tool targets a distinct resource and action. Multiple validators are differentiated by country and entity type (NIF, SIRET, TVA, IBAN). The only potential overlap is between calculate_working_days and get_portugal_holidays, but their purposes are clearly distinct: one counts days, the other lists holidays.

Naming Consistency3/5

Most tools follow a lowercase verb_noun pattern, but country encoding is inconsistent: some use prefix (get_france_holidays), some suffix (validate_nif_es), and some omit it entirely (validate_nif, validate_siret). The verb set is consistent (get, validate, calculate, format), but the inconsistencies in noun structure prevent a perfect score.

Tool Count5/5

11 tools is well within the ideal range for a domain-specific server. Each tool covers a distinct utility and the count is appropriate for the stated European business scope.

Completeness3/5

The server provides holiday data for France, Spain, and Portugal, but only calculates working days for Portugal. There is no working-days calculation for France or Spain despite equivalent holiday tools existing. Additionally, tax ID validation is limited to Portugal, Spain, and France, leaving other supported VAT/IBAN countries without fiscal identifier validation. These are notable gaps that affect agents handling non-Portuguese deadlines.

Resources