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.

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": {
      "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.1/5.0
Behavior4/5

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

Annotations already declare readOnly, idempotent, open-world, non-destructive, so the description correctly spends its words elsewhere. It adds genuinely non-obvious operational facts: no API key, no payment, and official Spanish/EU open-data provenance, which tells the agent about cost, auth, and reliability. It does not describe behavior for invalid or non-existent codes, which is the main remaining gap.

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?

Front-loaded English statement of purpose and returns, followed by source/availability notes – the ordering is good. The Spanish paragraph is a near-verbatim translation that doubles the length without adding new information, which is the only structural waste.

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, read-only lookup with no output schema, the description covers scope, return fields, input format, cost, and data provenance. Only edge-case behavior (unknown or malformed code) is unspecified, which is minor for this complexity level.

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% and the single parameter is already documented with an example (28013), so the baseline is 3. The description adds a real constraint beyond the schema: the code must be 5 digits ('de 5 cifras'), which is a validation rule the schema does not state.

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+resource ('Spanish postal code lookup') and enumerates exactly what is returned: province, autonomous community with ISO 3166-2 code, and provincial-capital flag. The direction of the mapping (postal code in, administrative region out) is unambiguous, which implicitly separates it from address-geocoding siblings.

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 rather than stated: an agent can infer it should call this when it has a 5-digit Spanish postal code and needs the province/community. There is no explicit when-to-use, when-not-to-use, or named alternative (e.g., geocoding or municipality population tools) for related queries.

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