Skip to main content
Glama

dato402 - Spain & EU data

Validate a Spanish tax ID

spain_validate_tax_id
Read-onlyIdempotent

Validate a Spanish tax ID (DNI, NIE, NIF or CIF) with the official check-digit algorithm. Returns document type, company legal form and validity.

ES: Valida un DNI, NIE, NIF especial o CIF español con el algoritmo oficial de dígito de control. Devuelve el tipo de documento, la forma jurídica (CIF) y si es válido.

Free tool (no API key, no payment). Official Spanish/EU open data.

Tool call template

Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {
      "valor": "<valor>"
    },
    "name": "spain_validate_tax_id"
  }
}

Input Schema

NameRequiredDescriptionDefault
valorYesDocumento a validar, p. ej. 12345678Z o B12345674

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A4.1/5.0
Behavior4/5

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

Annotations already declare readOnly, idempotent, non-destructive and open-world, so the safety profile is covered. The description adds real value beyond that: it names the official check-digit algorithm, lists the returned fields (document type, company legal form, validity), and discloses the no-API-key/no-payment access model plus the open-data provenance.

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?

Content is front-loaded and each clause carries information; nothing is padding. The cost is that the full text is duplicated in Spanish and English, roughly doubling length, though that duplication is a deliberate localization choice rather than filler.

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 one-parameter, no-output-schema tool with full annotations, the description covers the essentials, including what the response contains, so nothing critical is missing. The only gap is behavior on malformed input (error versus validity=false), which an agent would want to know.

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?

With a single parameter at 100% schema coverage the baseline is 3, but the description adds genuine meaning by enumerating the four document types accepted for that one 'valor' field, which the schema only illustrates with two example strings. It does not add format or normalization rules beyond that.

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 ('Validate') plus a precisely scoped resource ('Spanish tax ID'), enumerates the accepted document types (DNI, NIE, NIF, CIF), and names the algorithm used. An agent can distinguish it from iban_validate or eu_vat_check purely on the resource description.

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?

Usage is implied by the tool's scope (call it when you have a Spanish tax ID to check), and 'Free tool (no API key, no payment)' removes a common adoption blocker. However, there is no explicit when-to-use/when-not guidance and no routing to the nearest alternative such as eu_vat_check for non-Spanish VAT numbers.

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.

Resources