Skip to main content
Glama

Buscar municipio

buscar_municipio
Read-onlyIdempotent

Find Mexican municipalities by name in the bundled INEGI catalog offline, ignoring case, accents, and punctuation; return cvegeo, state code/name, and total matches.

Instructions

Busca municipios y alcaldías por nombre en el catálogo de INEGI que trae el paquete, sin red. No distingue mayúsculas, acentos ni signos: primero los de nombre igual al texto, luego los que empiezan con él y al final los que lo contienen. Devuelve de cada uno su clave geoestadística (cvegeo), la clave de su estado y el nombre del estado, y el total de coincidencias.

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": {
      "texto": "<texto>"
    },
    "name": "buscar_municipio"
  }
}

Input Schema

NameRequiredDescriptionDefault
textoYesNombre o parte del nombre del municipio.
limiteNoMáximo de resultados, de 1 a 50.
cve_entNoClave INEGI del estado (2 dígitos) para buscar solo en él.

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
totalYesCoincidencias sin el límite.
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
Behavior4/5

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

Annotations already declare readOnly, idempotent and openWorldHint=false, and the description reinforces the offline nature ('sin red') rather than repeating it. It adds real behavior the annotations cannot convey: normalization rules (case, accents, punctuation ignored) and the exact match-ordering (exact, then prefix, then contains), which lets an agent interpret result ordering.

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 dense paragraph that front-loads the core action and offline scope, then the matching behavior, then the return fields. Every clause carries information; only the output-field enumeration is arguably redundant given an output schema exists.

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 three fully documented parameters, annotations covering the safety profile, and an output schema present, the definition covers what an agent needs: data source, offline behavior, matching tolerance, result ordering. Minor gap: it does not clarify whether the returned 'total de coincidencias' is pre- or post-'limite'.

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 coverage is 100%, so 'texto', 'limite' and 'cve_ent' are already documented with constraints in the schema. The description adds only that matching is name-based and normalization-tolerant; it says nothing about how 'cve_ent' scoping interacts with the ranking or how 'limite' affects the reported total, so the baseline of 3 holds.

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 specific verb and resource ('Busca municipios y alcaldías') plus the search mode (by name, over the bundled INEGI catalog), which implicitly separates it from code-based lookups like 'municipio' or 'municipios_de_estado'. It never names those siblings, so the differentiation has to be inferred rather than read.

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 makes clear this is a partial-name search over local data ('sin red'), so an agent can infer when it applies. It gives no explicit when-not guidance and never points to an alternative tool for lookup by cvegeo or by state, leaving the routing decision implicit.

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