Skip to main content
Glama

Municipio por clave

municipio
Read-onlyIdempotent

Returns a municipality or borough by INEGI cvegeo (2-digit state + 3-digit area) with its state name, using the package's offline catalog.

Instructions

Devuelve un municipio o alcaldía por su clave geoestadística de INEGI (cvegeo: los 2 dígitos del estado y los 3 del municipio), con el nombre de su estado. Sale del catálogo que trae el paquete, sin red.

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": {
      "cvegeo": "<cvegeo>"
    },
    "name": "municipio"
  }
}

Input Schema

NameRequiredDescriptionDefault
cvegeoYesClave geoestadística de 5 dígitos.

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.
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.
origenYespaquete: los datos y las reglas del paquete mexicoapi, sin red.
fuentesYesTodas las fuentes de la respuesta, empezando por fuente.
advertenciasYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.2.1

TDQS

A3.7/5.0
Behavior3/5

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

Annotations already declare readOnly, idempotent and openWorld=false, so the safe-read profile is covered and 'sin red' largely restates that hint. The one genuinely new fact is provenance — data comes from a catalog bundled in the package — which implies a static, potentially non-live dataset, but nothing is said about not-found behavior or staleness.

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?

A single front-loaded sentence states the resource, then the key format, then the data source — good ordering with no filler. The only redundancy is 'sin red', which repeats openWorldHint=false.

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?

One required parameter at full schema coverage, complete annotations, and an output schema, so the description need not explain return shape — and it still mentions the returned state name. For a simple single-parameter local lookup, nothing an agent needs in order to call it correctly 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?

Schema coverage is 100%, so the baseline would be 3, but the description adds real meaning by decomposing cvegeo into 2 state digits plus 3 municipality digits, which the schema only calls 'Clave geoestadística de 5 dígitos'. That decomposition helps an agent construct or validate the value rather than guessing at its structure.

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?

Names a specific verb+resource pair ('Devuelve un municipio o alcaldía') and pins the exact keying concept (INEGI cvegeo). It implicitly distinguishes itself from search-style siblings like buscar_municipio by being an exact-key lookup, but never names an alternative explicitly.

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?

The description implies when this applies — you already have a 5-digit cvegeo in hand — but gives no explicit when/when-not statement and does not point to buscar_municipio or municipios_de_estado for the fuzzy or list cases. Usage is inferable, not stated.

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