Skip to main content
Glama

Código postal

codigo_postal
Read-onlyIdempotent

Look up the state, municipality, and settlements for a 5-digit Mexican postal code from the locally downloaded Correos de México catalog, with no network use.

Instructions

Estado, municipio y asentamientos (colonias, fraccionamientos, pueblos) de un código postal, del catálogo de Correos de México que el usuario descargó en este equipo con npx mexicoapi sepomex sync. No usa la red. Si el catálogo no está descargado, responde con error y el comando para descargarlo. Los datos son de Correos de México, para uso particular, y cada resultado trae su aviso de uso.

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": "codigo_postal"
  }
}

Input Schema

NameRequiredDescriptionDefault
cpYesCódigo postal de 5 dígitos, con ceros a la izquierda.

Output Schema

NameRequiredDescriptionDefault
as_ofYesFecha de corte del dataset: la de la última actualización que lo cambió (en los datos curados, la publicación más reciente de sus fuentes). No es la fecha del valor, que va en datos.
avisoYesAviso de uso de Correos de México.
datosYes
avisosYesLas advertencias con su código estable: avisos[i].texto es advertencias[i]. Un código desconocido vale como otro.
fuenteYesFuente para citar el dato.
origenYescache_local: el catálogo de Correos de México que el usuario descargó en este equipo.
fuentesYesTodas las fuentes de la respuesta, empezando por fuente.
descargadoYesCuándo se descargó el catálogo en este equipo.
advertenciasYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.2.1

TDQS

A3.8/5.0
Behavior4/5

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

The annotations already declare readOnly, offline (openWorldHint=false) and idempotent, so the safety profile is covered. The description still adds real context beyond them: the data provenance, that each result carries its own usage notice, and the concrete failure mode with its fix when the catalog is absent locally.

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?

The description is front-loaded with what is returned, then the data source, then the offline/error behavior — a sensible order with no wasted preamble. There is minor repetition of 'Correos de México' across two sentences, but nothing that impedes scanning.

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?

For a single-parameter read tool with an output schema already defining return values, the description covers everything an agent needs: what comes back, where the data lives, that no network call occurs, and what happens when the local catalog is missing.

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?

Schema description coverage is 100% and the single 'cp' parameter is documented in the schema with its 5-digit pattern and leading-zero rule. The description adds nothing about the parameter itself, so the baseline of 3 applies where the schema does all the work.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

States a precise verb-and-resource pair: it returns estado, municipio and asentamientos for a postal code, from a specific local Correos de México catalog. The scope is unambiguous, but the description never distinguishes it from the sibling 'municipio' or 'estados' tools, leaving the agent to infer the split from the input shape alone.

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?

It gives one genuinely useful precondition — the catalog must have been synced with 'npx mexicoapi sepomex sync', otherwise an error plus the remedy is returned — which tells the agent how to recover from failure. However, there is no guidance on when to pick this over the sibling lookup tools, so usage is only implied by the required 5-digit CP.

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