Skip to main content
Glama

Municipios de un estado

municipios_de_estado
Read-onlyIdempotent

Retrieve all municipalities for a Mexican state from bundled INEGI data offline, with total count and each cvegeo and name. Use it to answer which municipalities a state has or how many.

Instructions

Todos los municipios y alcaldías de un estado, con el total, del catálogo de INEGI que trae el paquete, sin red: de cada uno, su clave geoestadística (cvegeo) y su nombre; municipio da el registro completo. Úsala para preguntas como qué municipios tiene un estado o cuántos son: buscar_municipio solo da los que coinciden con un texto. Indica el estado con cve_ent (su clave de 2 dígitos) o con estado (su nombre o abreviatura, sin distinguir mayúsculas ni acentos), no con los dos. Si el nombre no es de un solo estado, responde con error; estados da los nombres y las claves.

Tool call template

This tool declares no required parameters. Add optional parameters from the input schema as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {},
    "name": "municipios_de_estado"
  }
}

Input Schema

NameRequiredDescriptionDefault
estadoNoNombre o abreviatura del estado, como los da estados.
cve_entNoClave INEGI del estado (2 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
totalYesMunicipios y alcaldías del estado.
avisosYesLas advertencias con su código estable: avisos[i].texto es advertencias[i]. Un código desconocido vale como otro.
estadoYesEl estado consultado.
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

A4.6/5.0
Behavior4/5

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

Annotations already declare readOnlyHint, idempotentHint and openWorldHint=false, and the description usefully reinforces 'sin red' (offline catalog bundled with the package) and adds the total count to the response. It also discloses an error path the annotations cannot express: a non-single-state name produces an error. It does not go further on response shape, but the output schema covers that.

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?

One dense but front-loaded passage: scope and return fields first, then routing to siblings, then parameter rules and the error case. No filler sentences, though the single run-on construction makes it slightly harder to scan than separated clauses would.

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 two-optional-parameter read-only lookup with an output schema and full annotation coverage, the description supplies everything else an agent needs: data source, offline behavior, sibling routing, parameter exclusivity, and the error condition.

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 is 3, but the description adds real semantics beyond the schema: the two parameters are mutually exclusive ('no con los dos'), estado is matched case- and accent-insensitively, and cve_ent is the 2-digit INEGI key. These are constraints an agent needs and that the schema text 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 and resource ('Todos los municipios y alcaldías de un estado, con el total') plus what is returned per item (cvegeo y nombre). It explicitly distinguishes itself from buscar_municipio ('solo da los que coinciden con un texto'), municipio ('da el registro completo') and estados (which supplies the keys).

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines5/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

Gives concrete use cases ('qué municipios tiene un estado o cuántos son'), names the alternatives and the condition that selects them, and states the exclusion: 'no con los dos' for cve_ent/estado. It also tells the agent to consult estados for names/keys and that an ambiguous name yields an error.

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