Skip to main content
Glama

dato402 – Spain & EU data

Spanish postal code lookup

spain_postal_code
Read-onlyIdempotent

Spanish postal code lookup: province, autonomous community (with ISO 3166-2 code) and whether it is the provincial capital.

ES: Provincia, comunidad autónoma (con su código ISO) y si es la capital de provincia, a partir de un código postal español de 5 cifras.

Source of truth: official Spanish/EU open data. Free via MCP up to 20 calls/day; unlimited via the x402 pay-per-call endpoint https://dato402.com/api/es/codigo-postal ($0.001 USDC).

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": {
      "cp": "<cp>"
    },
    "name": "spain_postal_code"
  }
}

Input Schema

NameRequiredDescriptionDefault
cpYesCódigo postal, p. ej. 28013

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A4/5.0
Behavior4/5

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

Annotations already declare readOnly, idempotent, openWorld and non-destructive, so safety needs no restating. The description adds genuinely new behavioral context: the data provenance (official Spanish/EU open data) and a hard quota of 20 free calls/day with a priced x402 endpoint after that, which an agent can use to decide when to conserve calls. It omits what happens for invalid or unassigned codes, so it is not complete.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness3/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The English sentence is well front-loaded and the return fields come first. However the Spanish paragraph restates the same content verbatim and the pricing/URL sentence reads as promotion, so a meaningful share of the text is redundant for an agent.

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?

With one required parameter, full schema coverage, and no output schema, the description is complete enough: it names the returned fields (which the absent output schema cannot), and discloses quota and source. The only real gap is failure behavior for malformed or unknown postal codes.

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?

Schema coverage is 100% for the single parameter, so the baseline is 3. The description adds the format constraint not present in the schema example — a 5-digit Spanish postal code — which meaningfully narrows what a valid input looks like.

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 ('Spanish postal code lookup') and enumerates exactly what is returned: province, autonomous community with ISO 3166-2 code, and provincial-capital flag. No sibling tool covers postal codes, so no differentiation is needed and none is implied.

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 input constraint ('a partir de un código postal español de 5 cifras'), which tells the agent it needs a 5-digit Spanish code. There is no explicit when-to-use/when-not statement, no guidance for partial or foreign codes, and no named alternative even though none of the siblings obviously overlap.

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