Skip to main content
Glama

enaho-mcp

M8ven Score Verificado M8ven

Servidor MCP y CLI para los microdatos del INEI (Perú): ENAHO, ENDES, ENAPRES, ENA y ocho encuestas más.

El portal de microdatos del INEI es una aplicación ASP con dropdowns en cascada y sin API. Bajar un módulo son cuatro clicks; bajar una encuesta completa a través de los años son cientos. Pero el problema grande no es mecánico: es saber qué pedir. Que el ingreso del hogar está en la Sumaria y no en el módulo de empleo, que las llaves de unión son conglome/vivienda/hogar, que en la ENDES son hhid/caseid y su factor viene multiplicado por un millón, o que un promedio sin factor de expansión no representa a nadie.

Este servidor mete ese conocimiento en las herramientas, no en el prompt.


Qué hace bien

Reproduce las cifras oficiales. Validado contra el informe técnico de pobreza 2023 del INEI:

Indicador

enaho-mcp

Oficial INEI

Incidencia de pobreza 2023

29.046 %

29.0 %

Pobreza extrema 2023

5.747 %

5.7 %

Pobreza extrema 2022

5.010 %

5.0 %

Pobreza extrema 2021

4.123 %

4.1 %

Gini del ingreso per cápita 2023

0.4233

~0.42

Población expandida 2023

34 107 048

~34.1 M

Nunca devuelve microdatos al contexto. Las herramientas devuelven metadatos, rutas en disco y agregados chicos. Cuando el parquet está listo, el análisis libre se hace con pandas sobre esa ruta.

Estadística correcta bajo diseño complejo. Linealización de Taylor con estimador de conglomerado último, IC logit para proporciones, mediana por Woodruff, chi-cuadrado corregido por Rao-Scott, prueba de diferencia entre dominios con su covarianza, Gini y percentiles por bootstrap rescalado de Rao-Wu-Yue, regresión lineal y logit con errores estándar por sandwich de conglomerados (el equivalente de svy: reg) e índices FGT de pobreza. Sin scipy ni samplics: código auditable y bajo test.

Genera el entregable. Informes en Word, Excel, PDF, Markdown y HTML construidos ejecutando las estimaciones, no copiando números.

Avisa de lo que suele salir mal en silencio. Filas perdidas en cada merge, estratos con un solo conglomerado, coeficientes de variación por encima del umbral de publicación del INEI, variables que cambian de significado entre olas, pesos DHS sin escalar y líneas de pobreza en otra unidad que el gasto.


Related MCP server: emovi-mcp

Instalación

git clone <este-repo> && cd enaho-mcp
uv sync
uv run enaho doctor      # comprueba catálogo, índice, cache y dependencias

Registro en Claude Code (scope user para tenerlo en todos los proyectos):

claude mcp add --scope user --transport stdio enaho \
  -- uv run --directory /ruta/absoluta/enaho-mcp python -m enaho_mcp.interfaces.mcp.servidor

Verificación: claude mcp list, y dentro de la sesión /mcp.

Sin cliente MCP: uv run enaho-mcp --diagnostico lista herramientas, resources y prompts.


Verificación

Este servidor ha sido verificado por M8ven (Trust Score: 67/100):

  • ✅ Sin exfiltración de credenciales ni acceso a archivos sensibles

  • ✅ Sin ofuscación de código

  • ✅ Variables de entorno declaradas (ENAHO_MCP_HOME, ENAHO_MCP_LIMITE_GB, ENAHO_MCP_DEBUG)

  • ✅ Disponible en Glama MCP Registry

Sugerencias de mejora pendientes:

  • Añadir anotaciones readOnlyHint/destructiveHint a herramientas

  • Declarar inputSchema con validación en todas las herramientas

  • Añadir manejo de errores estructurado en handlers

  • Añadir archivo LICENSE (MIT)

  • Añadir tests que ejerciten las herramientas declaradas


Encuestas soportadas

enaho encuestas las lista, y dice además cuáles del portal no tienen perfil.

id

Encuesta

Llave de hogar

Factor

Perfil

enaho

Condiciones de Vida y Pobreza

conglome/vivienda/hogar

factor07

verificado, 12 módulos curados

endes

Demográfica y de Salud Familiar

hhid (hogar), caseid (mujer)

hv005, v005 ÷10⁶

verificado, 13 módulos curados

enaho-panel

ENAHO Panel

seguimiento propio

propio

acotado

enapres

Programas Presupuestales

conglomerado/vivienda/hogar

factor

inferido

ena

Nacional Agropecuaria

id_prod (no es un hogar)

factor_productor

inferido

enut

Nacional de Uso del Tiempo

conglomerado/vivienda/hogar

factor

inferido

enares

Relaciones Sociales

conglomerado/vivienda/hogar

factor

inferido

enapref

Presupuestos Familiares

conglomerado/vivienda/hogar

factor

inferido

epen-*

Permanente de Empleo Nacional

conglomerado/muestra/selviv/hogar

fac300_anual

inferido

epe-lima

Permanente de Empleo (Lima)

conglome/vivienda/hogar

fac500a

inferido

enco

Nacional Continua (2006)

conglome/vivienda/hogar

factor

inferido

cenagro

Censo Nacional Agropecuario

p001/p002/p003/p007x/p008

ninguno (censo)

inferido, 11 módulos

mapa-pobreza

Mapa de Pobreza (distrital)

id_hogar_m

facfinal_proy

inferido, 4 módulos

«Inferido» significa inferido, y el servidor lo declara en cada respuesta (aviso_perfil) en vez de fingir certeza: esas llaves salieron del índice de variables, no de un diccionario. Funcionan; hay que verificarlas con enaho perfil antes de publicar.

Dos rompen supuestos del resto. El CENAGRO es un censo: no tiene factor de expansión porque no se muestreó nada, y sus cifras son conteos exactos sin error de muestreo. El CENAGRO y el Mapa de Pobreza publican un archivo por departamento y ninguno nacional; el servidor los apila y añade la columna corte, en vez de quedarse con Amazonas y llamarlo Perú.

El catálogo del INEI tiene 67 encuestas. Las que no tienen perfil se pueden listar y descargar, y enaho sondear propone cómo unirlas mirando los datos reales, siempre marcado como inferencia. Añadir un perfil: ver docs/anadir-una-encuesta.md.

Los Censos Nacionales de Población y Vivienda no están en este portal: se distribuyen por REDATAM, que es otro sistema. El Mapa de Pobreza es el atajo para el caso que lleva a la mayoría de la gente a querer el censo — desagregar por distrito — con estimaciones que el INEI ya publica calculadas.


Uso desde la CLI

La CLI y el servidor MCP llaman a los mismos casos de uso. Lo que funciona en uno funciona en el otro.

# 1. ¿Qué hay?
enaho encuestas
enaho modulos 2023                      # ENAHO por defecto
enaho modulos 2023 --encuesta endes

# 2. ¿Cómo se llama la variable que busco?
enaho buscar variable "pobreza" --anio 2023
enaho buscar rastrear p207 --desde 2015 --hasta 2024   # ¿cambió de significado?
enaho describir 2023 74 --encuesta endes

# 3. Bajar y preparar
enaho descargar -a 2023 -m 01 -m 34
enaho unir -a 2023 -m 01 -m 34 --nivel hogar -o hogares2023

# 4. Estimar
enaho perfil hogares2023 -v pobreza -v factor07
enaho estimar hogares2023 pobreza -e proporcion --valor 1 --peso-adicional mieperho
enaho geografia hogares2023 --nivel departamento -o hogares2023_dep

# 5. Comprobar antes de publicar
enaho calidad hogares2023 --formato html
enaho sondear 2024 -m 1856 -m 1860 --encuesta enapres

# 6. Analizar más a fondo
enaho comparar hogares2023 pobreza -g estrato --a 8 --b 1 -e proporcion --valor 1
enaho desigualdad hogares2023 gashog2d -i gini -i p90_p10 --peso-adicional mieperho
enaho distribucion hogares2023 gashog2d --peso-adicional mieperho
enaho pobreza hogares2023_pc gasto_pc_mes --linea linea --peso-adicional mieperho
enaho regresion hogares2023 gashog2d -x mieperho -x estrato --peso-adicional mieperho
enaho serie pobreza --desde 2019 --hasta 2023 -m 01 -m 34 -e proporcion --valor 1

# 7. Sacar el resultado
enaho exportar hogares2023 -f dta        # dta sav csv xlsx parquet feather
enaho informe mi_informe.json --formato docx

# 8. Mantenimiento
enaho ubigeo derivar --corte Arequipa
enaho catalogo estado
enaho catalogo actualizar -E ENAHO -E ENDES
enaho docs convertir 2023 -d diccionario   # PDF del INEI -> Markdown
enaho docs buscar mieperho --exacto        # cita documento y pagina

Todos los comandos aceptan --json; los que operan sobre una encuesta aceptan --encuesta.


Documentación

Documento

Para qué

Recetario

Diez recetas completas, cada una diciendo qué error evita. Empieza aquí.

Referencia de herramientas

Las 32 herramientas MCP con sus parámetros. Generada desde el servidor.

Los métodos

Qué estimador se usa para cada cosa y por qué.

Añadir una encuesta

De 15 perfiles a las 67 encuestas del portal.

examples/

Scripts ejecutables. Los tests los corren, así que no se pudren.


Informes

enaho_informe no redacta copiando números: recibe la narrativa y una especificación de qué calcular, ejecuta las estimaciones con la maquinaria de diseño complejo y pinta los cuadros. Los números del documento no pasan por el contexto del modelo, así que no se degradan al recopiarlos.

{
  "titulo": "Pobreza monetaria en el Perú, 2023",
  "autor": "…",
  "secciones": [
    {"tipo": "texto", "titulo": "Introducción", "texto": "…"},
    {"tipo": "estimacion", "titulo": "Incidencia por dominio",
     "dataset": "hogares2023", "variable": "pobreza",
     "estadistico": "proporcion", "valor": 1,
     "por": ["dominio"], "peso_adicional": "mieperho"},
    {"tipo": "desigualdad", "dataset": "hogares2023", "variable": "gashog2d",
     "indicadores": ["gini", "p90_p10"]},
    {"tipo": "cruce", "dataset": "hogares2023", "fila": "pobreza", "columna": "estrato"},
    {"tipo": "comparacion", "dataset": "hogares2023", "variable": "pobreza",
     "variable_grupo": "estrato", "grupo_a": 8, "grupo_b": 1},
    {"tipo": "serie", "anio_inicio": 2019, "anio_fin": 2023,
     "modulos": ["01", "34"], "variable": "pobreza"}
  ]
}

Formatos: docx, xlsx (una hoja por cuadro, números como números), pdf, md, html. Los tres primeros necesitan uv sync --extra informes; md y html no necesitan nada.

Tres cosas que hace y que un «escribe un docx con estos números» no da:

  • Los códigos salen etiquetados. Un cuadro por dominio dice «Lima Metropolitana», no «8».

  • Las advertencias viajan pegadas a su cuadro. Si tres celdas tienen CV > 15 %, el cuadro sale con su nota al pie diciendo que el INEI no las publica.

  • Una sección rota no tumba el informe. Queda marcada dentro del documento con su sugerencia de arreglo y el resto se genera igual.


Herramientas MCP (32)

Grupo

Herramientas

Descubrimiento

enaho_buscar_variable, enaho_rastrear_variable, enaho_listar_modulos, enaho_describir_modulo, enaho_listar_encuestas

Adquisición

enaho_descargar, enaho_descargar_documentacion, enaho_estado_cache, enaho_estado_catalogo, enaho_actualizar_catalogo

Preparación

enaho_unir_modulos, enaho_agregar_modulo, enaho_perfil, enaho_listar_datasets, enaho_exportar

Diagnóstico

enaho_calidad, enaho_sondear_llaves

Documentación

enaho_documentacion_convertir, enaho_documentacion_buscar

Estimación

enaho_estimar, enaho_comparar, enaho_desigualdad, enaho_tabla_cruzada

Modelos

enaho_regresion, enaho_pobreza_fgt, enaho_distribucion

Series

enaho_serie

Informes

enaho_informe

Geografía

enaho_geografia, enaho_ubigeo_buscar

Panel

enaho_panel_inspeccionar, enaho_panel_armar

Resources (6): enaho://modulos, enaho://encuestas, enaho://cache, enaho://modulos/{anio}, enaho://ficha/{anio}/{modulo}, enaho://dominio/{encuesta}

Prompts (5): /enaho-pobreza, /enaho-empleo, /enaho-explorar, /enaho-otra-encuesta, /enaho-verificar

Referencia completa con parámetros: docs/herramientas.md.


El detalle que más importa: el universo de población

Comprobado contra la ENAHO 2023, con tres formas de calcular lo mismo y tres resultados distintos:

Método

Universo

Pobreza

Hogares × factor07 × mieperho

34 107 048 personas

29.05 % ← cifra oficial

Hogares × factor07

10 196 775 hogares

23.15 % ← hogares pobres, no personas

Roster del módulo 02 × factor07

36 252 082 personas

28.46 % ← universo equivocado

El roster del módulo 02 incluye trabajadores del hogar, pensionistas y sus familiares, que quedan fuera de mieperho. Para indicadores de población que deban reproducir cifras oficiales hay que usar el archivo a nivel hogar con peso_adicional="mieperho".

El servidor detecta la situación y la advierte cuando estimas sobre un roster de personas sin peso adicional, en vez de dejar que publiques un número que se parece al bueno. La comprobación es genérica: en la ENDES la heredan HV009 y HHID.


Arquitectura

Cuatro capas con la regla de dependencia hacia adentro:

interfaces/          MCP y CLI. Capas finas: validan, delegan, formatean.
   │
   ▼
aplicacion/          Casos de uso. El contrato compartido por ambas interfaces.
   │                 contenedor.py es el composition root.
   ▼
dominio/             Núcleo. Sin red, sin disco, sin MCP.
   ├── modelo/       Value objects y entidades (Anio, CodigoModulo, Ubigeo…)
   ├── conocimiento/ Perfiles de encuesta: llaves, factores y trampas de cada una
   ├── servicios/    Unión, estimación, regresión, pobreza, tabulación, geografía
   └── puertos.py    Interfaces (Protocol) que la infraestructura implementa
   ▲
   │
infraestructura/     Adaptadores: catálogo INEI, descarga, lectura, parquet, ubigeo

La regla de dependencia está bajo test: tests/test_interfaces.py analiza el AST de cada módulo del dominio y falla si aparece un import de infraestructura o una llamada a E/S.

Cuatro decisiones que conviene conocer antes de leer el código:

  • pandas.DataFrame es un primitivo del dominio (ADR-001, en dominio/modelo/tabla.py). El dominio de este sistema es estadística sobre tablas rectangulares; inventar una tabla propia y traducir en cada frontera no compra nada. Lo que sí queda prohibido en el dominio es tocar E/S.

  • Los casos de uso son funciones, no clases. Reciben primitivos y devuelven un dict chico y serializable. Ese dict es lo que hace que cada comando de CLI sean diez líneas de presentación en vez de una segunda implementación.

  • Lo que cambia entre encuestas es un PerfilEncuesta, no una rama en el código. La infraestructura y los estimadores son agnósticos; el perfil declara llaves, factores, escala del peso y tabla de módulos.

  • La encuesta viaja en los metadatos del dataset. Después de unir no hay que repetir encuesta="endes" en cada llamada: el parquet lo recuerda y el parámetro solo sirve para sobreescribirlo.


Desarrollo

uv sync --group dev --all-extras
uv run pytest              # 454 tests, ninguno toca la red
uv run ruff check src tests
uv run mypy src/enaho_mcp
uv run python scripts/generar_referencia.py   # regenera docs/herramientas.md

Los ZIP de juguete se construyen en tiempo de test con pyreadstat en vez de versionarse como binarios: son deterministas, se leen con el mismo código que los reales y no engordan el repositorio.

Variables de entorno: ENAHO_MCP_HOME (raíz del cache), ENAHO_MCP_LIMITE_GB, ENAHO_MCP_MAX_MODULOS, ENAHO_MCP_DEBUG.


Limitaciones conocidas

  • La tabla de ubigeo empaquetada cubre solo los 25 departamentos. Escribir de memoria los 1 800+ distritos sería inventar datos. Para trabajar a nivel provincia o distrito: enaho ubigeo importar ruta/al/ubigeo.csv con columnas codigo,departamento,provincia,distrito.

  • El índice de variables cubre 16 de las 67 encuestas. ENUT, ENARES, ENAPREF y ENCO se pueden descargar y leer, pero no buscar. El servidor lo dice explícitamente en vez de devolver un «no encontrado» que se leería como «esa variable no existe».

  • La tabla de ubigeo con nombres hay que derivarla. enaho ubigeo derivar la extrae del módulo 632 del Mapa de Pobreza, que es la fuente oficial más cercana en este portal, pero son 24 descargas y los códigos son de la división política de ese operativo: los distritos creados después no están.

  • La documentación se convierte, no se interpreta. enaho docs convertir pasa los PDF del INEI a Markdown conservando el texto en orden de lectura, pero no reconstruye tablas: el diccionario no las dibuja con líneas. Los 27 PDF de la ENAHO 2023 tienen capa de texto; si alguna ola vieja resulta ser un escaneo, el conversor lo detecta y lo dice, pero no hace OCR.

  • Las llaves sondeadas son inferencia. enaho sondear propone y muestra la evidencia; no cura. Contrástalas con el diccionario antes de publicar.

  • Los perfiles marcados «inferido» lo son. ENAPRES, ENA, ENUT, ENARES, ENAPREF, EPEN, EPE y ENCO tienen llaves deducidas del índice de variables, no contrastadas contra un diccionario. Cada respuesta lo declara.

  • ENAHO Panel no está resuelto, está acotado. Es otro dataset: formato ancho, llaves de seguimiento propias y factores calibrados para la submuestra seguida. enaho_panel_inspeccionar reporta las columnas reales y enaho_panel_armar reestructura a formato largo, pero no asigna factor de expansión: eso hay que verificarlo con el manual del panel.

  • El refresco del catálogo depende de que el portal no cambie. Si el crawl falla, el servidor vuelve solo al catálogo empaquetado, que nunca se borra.

Ver DECISIONES.md para las desviaciones respecto del documento de diseño original y por qué.


Licencia

MIT.

Available Tools

32 tools
enaho_agregar_moduloA
Idempotent

Colapsa un modulo de gastos o produccion al nivel hogar.

Los modulos 07 a 28 tienen una fila por PRODUCTO, no por hogar. Unirlos crudos multiplica las filas del hogar por el numero de productos y todo lo que estimes despues sale inflado. Esta herramienta los agrega antes.

Hay que decir explicitamente que variables agregar y con que funcion: no existe un "agrega todo lo numerico" porque sumar un codigo de producto produce un numero que parece un dato. Usa enaho_buscar_variable con el modulo para ver que hay dentro.

Aviso importante que la herramienta tambien reporta: con funcion 'suma', un hogar cuyas filas eran todas faltantes queda como faltante, NO como cero. Tratarlo como cero sesga el gasto hacia abajo.

ParametersJSON Schema
NameRequiredDescriptionDefault
anioYes
nivelNohogar
moduloYesModulo de items: 07 (alimentos), 08, 09, 22, 26...
salidaNoNombre del dataset.
encuestaNoEncuesta del INEI sobre la que operar. Por defecto 'enaho'. Valores: enaho, enaho-panel, endes, enapres, enut, enares, ena, epen-departamentos, epen-ciudades, epen-lima, epe-lima, enapref, enco, cenagro, mapa-pobreza. Cada encuesta tiene sus propias llaves de union y su propio factor de expansion; no se pueden mezclar entre si.
variablesYesMapa variable -> funcion. Funciones: suma, media, maximo, minimo, conteo. Ejemplo: {'i580a': 'suma', 'p601a': 'conteo'}.

Output Schema

ParametersJSON Schema
NameRequiredDescription

No output parameters

TDQS

A4.6/5.0
Behavior5/5

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

Beyond the annotations (readOnlyHint=false, idempotentHint=true, destructiveHint=false), the description discloses critical runtime behavior: with function 'suma', a household with all missing rows remains missing rather than zero, and treating it as zero biases estimates. It also warns against 'aggregate all numeric' because summing product codes yields meaningless numbers. This adds significant behavioral context that annotations do not convey.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is compact but dense: the first sentence states the core purpose, the second paragraph explains why the tool exists, the third gives usage rules, and the fourth provides a critical warning. Each section serves a distinct function, with no filler.

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?

Given the tool's complexity (nested variables object, multiple parameters) and the presence of an output schema, the description covers all essential behavioral aspects: aggregation logic, variable selection, missing-value handling, and differentiation from raw joins. The only notable omission is the `nivel` parameter's persona option, which is available in the schema but not mentioned in the text.

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?

The schema covers 67% of parameters; the description compensates by explaining the `variables` parameter in depth: users must explicitly map variables to functions because there is no automatic option, and it provides the example of summing product codes as a pitfall. It does not explain the `nivel` parameter, which allows both 'hogar' and 'persona', while the description only mentions household level; this is a slight gap.

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?

The description opens with 'Colapsa un modulo de gastos o produccion al nivel hogar' – a specific verb and resource – and immediately distinguishes itself from raw joins by explaining that modules 07-28 have one row per product and that joining raw inflates estimates. This clearly separates it from sibling tools like enaho_unir_modulos.

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

Usage Guidelines4/5

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

The description explains when to use the tool: for modules 07-28 that have product-level rows and need to be aggregated before analysis. It also instructs users to use enaho_buscar_variable to explore module variables, providing a concrete workflow. However, it does not explicitly list situations where another tool should be used instead (e.g., retaining product-level detail), so it lacks a true when-not clause.

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

enaho_buscar_variableA
Read-onlyIdempotent

Encuentra en que modulo y con que nombre esta una variable.

Es la herramienta que mas se usa y la mas barata: consulta el indice pre-construido, sin descargar ni un byte de microdatos. Empieza SIEMPRE por aqui cuando no sepas el nombre exacto de una variable.

Busca en la ENAHO salvo que pases encuesta. El indice cubre 16 de las 67 encuestas del portal; si pides una que no esta indexada, el error lo dice en vez de devolver un "no encontrado" que se leeria como "esa variable no existe".

Devuelve los resultados agrupados por modulo, con el total de coincidencias y si hay mas paginas.

ParametersJSON Schema
NameRequiredDescriptionDefault
anioNoRestringe la busqueda a un anio (2004-2025).
exactoNoExige coincidencia exacta del nombre de variable.
limiteNoResultados por pagina.
moduloNoRestringe a un modulo, por ejemplo '34' (Sumaria).
terminoYesNombre de variable o palabra de su etiqueta. Ejemplos: 'p207', 'inghog1d', 'pobreza', 'gasto en educacion', 'afiliacion'.
encuestaNoEncuesta del INEI sobre la que operar. Por defecto 'enaho'. Valores: enaho, enaho-panel, endes, enapres, enut, enares, ena, epen-departamentos, epen-ciudades, epen-lima, epe-lima, enapref, enco, cenagro, mapa-pobreza. Cada encuesta tiene sus propias llaves de union y su propio factor de expansion; no se pueden mezclar entre si.
desplazamientoNoResultados a saltar, para paginar.

Output Schema

ParametersJSON Schema
NameRequiredDescription

No output parameters

TDQS

A4.5/5.0
Behavior5/5

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

The description adds meaningful behavioral context beyond the readOnly and idempotent annotations: it consults a pre-built index without downloading data, and it discloses error semantics for non-indexed surveys (clear error instead of misleading 'not found'). It also previews the grouped results and pagination, which are not in the annotations.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is concise yet information-dense, with clear sections: purpose, usage guidance, scope/limitations, and return format. It front-loads the primary purpose and gives actionable advice without wasted words.

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?

Given the presence of an output schema and strong annotations, the description fills key gaps: when to use, performance characteristics, coverage limitations, and error behavior. It is complete enough for an agent to decide whether to invoke this tool and what to expect.

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?

The schema describes all 7 parameters with high coverage (100%), so the description need not elaborate on each. It does add conceptual context about the default survey scope and the encuesta override, but this largely mirrors the schema's encuesta description. Overall, the description adds modest value beyond the schema.

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?

The description opens with a clear statement of purpose: 'Encuentra en que modulo y con que nombre esta una variable.' It also distinguishes itself from siblings by describing it as the most-used, cheapest tool that queries a pre-built index without downloading microdata, making its role unique among the provided sibling tools.

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

Usage Guidelines4/5

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

It explicitly instructs 'Empieza SIEMPRE por aqui cuando no sepas el nombre exacto de una variable,' which is strong guidance. It also explains the default ENAHO scope, the ability to override with `encuesta`, and the coverage limitation of 16/67 surveys, but it does not explicitly name alternative tools for other scenarios.

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

enaho_calidadA
Read-onlyIdempotent

Responde si un dataset sirve para lo que se va a hacer con el.

Es distinto de enaho_perfil, que describe. Esto DIAGNOSTICA cinco cosas que, si fallan, producen resultados creibles y equivocados:

  • Llaves duplicadas o con nulos: un merge posterior multiplicaria filas, o las perderia sin avisar. Es el fallo mas caro y el mas dificil de ver a ojo.

  • Cobertura por variable: distingue entre "universo restringido" y "merge que no emparejo", que se parecen mucho en una tabla.

  • Codigos sin etiqueta: un 9 en una variable definida 1-3 suele ser un "no responde" que nadie convirtio a faltante y que entra en los promedios como un dato.

  • Factor invalido: filas con factor nulo, cero o negativo que el estimador descarta en silencio.

  • Columnas constantes o vacias: la senal habitual de haber unido el archivo equivocado.

Devuelve apto_para_estimar y los problemas separados entre los que impiden estimar y los que solo hay que mirar. Llamala despues de enaho_unir_modulos y antes de publicar cualquier cifra.

ParametersJSON Schema
NameRequiredDescriptionDefault
salidaNoNombre del archivo generado.
datasetYesNombre corto del dataset preparado.
formatoNoSi se indica, ademas escribe el informe en disco: 'html', 'md', 'docx', 'xlsx' o 'pdf'.

Output Schema

ParametersJSON Schema
NameRequiredDescription

No output parameters

TDQS

A4.7/5.0
Behavior5/5

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

Annotations already declare readOnlyHint, idempotentHint, and destructiveHint false; the description adds substantial behavioral context by explaining what the diagnostics detect, why failures are dangerous, and that it returns apto_para_estimar with problems separated by severity. No contradiction with annotations.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is front-loaded with the main purpose, then uses a structured bullet list to explain each of the five checks and their consequences. Every sentence adds value, and the markdown formatting makes it scannable; length is justified by the tool's complexity.

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?

Given the tool's complexity, the description covers purpose, workflow timing, output content ('Devuelve apto_para_estimar y los problemas separados...'), and the key failure modes. It also complements the annotations and schema without relying on them; output schema exists so return-value detail is not required.

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 covers 100% of parameters with descriptions for dataset, salida, and formato, so the baseline is 3. The description does not add parameter-level detail; it mentions dataset only implicitly and leaves salida/formato behavior to the schema.

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?

The description clearly identifies the tool's specific action: determining whether a dataset is fit for its intended use ('Responde si un dataset sirve'). It lists five concrete diagnostic checks and explicitly distinguishes itself from enaho_perfil ('Es distinto de enaho_perfil, que describe'), so it differentiates from siblings.

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?

It explicitly names the alternative enaho_perfil and contrasts their purposes, and it gives workflow placement: 'Llamala despues de enaho_unir_modulos y antes de publicar cualquier cifra.' This is clear when-to-use guidance with an exclusion.

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

enaho_compararA
Read-onlyIdempotent

¿La diferencia entre dos grupos es real o es ruido muestral?

Devuelve la diferencia, su error estandar, el intervalo de confianza, el estadistico t y el p-valor.

Usa esto en vez de mirar si los intervalos de confianza individuales se solapan. Ese atajo falla en las dos direcciones: dos intervalos que se solapan pueden corresponder a una diferencia significativa, y como ambos dominios comparten conglomerados hay una covarianza que cambia el error estandar de la diferencia. Aqui se construye el linealizado de la diferencia sobre el diseno completo, asi que esa covarianza entra sola.

ParametersJSON Schema
NameRequiredDescriptionDefault
valorNoCategoria de interes si estadistico='proporcion'.
datasetYesDataset preparado.
grupo_aYesPrimer grupo.
grupo_bYesSegundo grupo.
encuestaNoEncuesta del INEI sobre la que operar. Por defecto 'enaho'. Valores: enaho, enaho-panel, endes, enapres, enut, enares, ena, epen-departamentos, epen-ciudades, epen-lima, epe-lima, enapref, enco, cenagro, mapa-pobreza. Cada encuesta tiene sus propias llaves de union y su propio factor de expansion; no se pueden mezclar entre si.
variableYesVariable a comparar.
estadisticoNomedia
peso_adicionalNoEj. 'mieperho'.
variable_grupoYesColumna que define los grupos, ej. 'departamento'.

Output Schema

ParametersJSON Schema
NameRequiredDescription

No output parameters

TDQS

A4.2/5.0
Behavior4/5

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

Annotations already declare the operation as read-only, idempotent, and non-destructive. The description adds valuable methodological context: it builds a linearized difference over the full survey design, accounting for covariance between domains. This goes beyond the annotations and clarifies the tool's statistical behavior.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is three sentences: a purpose-driven question, a clear list of outputs, and usage guidance with reasoning. Every sentence earns its place, and it is front-loaded with the core purpose.

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?

Given the tool's moderate complexity and the presence of an output schema, the description provides adequate context: purpose, outputs, and when to use it. It does not explain prerequisites, but those are captured in the schema and annotations.

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 high (89%), so parameters are well-documented in the schema itself. The description does not add parameter-specific details but aligns with the overall goal of comparing two groups, so the baseline 3 is appropriate.

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?

The description clearly states the tool returns the difference, standard error, confidence interval, t-statistic, and p-value for comparing two groups. It also distinguishes itself from the ad-hoc approach of comparing overlapping confidence intervals, making its specific role clear.

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

Usage Guidelines4/5

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

The description explicitly advises using this tool instead of checking overlap of individual confidence intervals and explains why that shortcut fails. It does not reference sibling tools directly, but the when-to-use guidance is strong and specific.

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

enaho_descargarA
Idempotent

Descarga modulos al cache local. NO devuelve microdatos, devuelve rutas.

El cache es idempotente: lo ya descargado e integro se salta. Los ZIP se verifican y los truncados se vuelven a bajar solos, cosa habitual porque el portal del INEI corta conexiones.

Hay un tope de descargas por llamada para no bloquear la sesion con un anio completo. Si pides mas, el error te dice como dividirlo.

ParametersJSON Schema
NameRequiredDescriptionDefault
aniosYesAnios a descargar, por ejemplo [2023] o [2019, 2020].
cortesNoDepartamentos a bajar, en las encuestas que publican un archivo por departamento y ninguno nacional (cenagro, mapa-pobreza). Sin filtro se bajan los 24-25, y cada modulo cuenta como 25 descargas contra el tope por llamada.
forzarNoVuelve a bajar aunque el ZIP ya este en el cache.
formatoNoSTATA por defecto: es el unico que trae etiquetas de variable y de valor. Si el anio no lo publica se cae a SPSS y luego a CSV, y el formato realmente obtenido se reporta.STATA
modulosYesCodigos de modulo: ['01','34'] para hogar+Sumaria, ['02','05','34'] para persona con empleo.
encuestaNoEncuesta del INEI sobre la que operar. Por defecto 'enaho'. Valores: enaho, enaho-panel, endes, enapres, enut, enares, ena, epen-departamentos, epen-ciudades, epen-lima, epe-lima, enapref, enco, cenagro, mapa-pobreza. Cada encuesta tiene sus propias llaves de union y su propio factor de expansion; no se pueden mezclar entre si.

Output Schema

ParametersJSON Schema
NameRequiredDescription

No output parameters

TDQS

A4.7/5.0
Behavior5/5

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

The description adds substantial behavioral context beyond the annotations: it explains the idempotent cache behavior (skipping already-downloaded complete modules), ZIP integrity verification with automatic redownload of truncated files, and a per-call download limit that returns a divide-the-request error. This goes well beyond the idempotentHint and readOnlyHint annotations, giving the agent a clear model of the tool's side effects and error handling.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is remarkably concise: three short paragraphs that front-load the core purpose and return type, then add behavioral details without repetition. Every sentence earns its place, covering idempotency, ZIP verification, and rate limits in a compact way.

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?

Given the 6 parameters, comprehensive schema, output schema, and annotations, the description covers all critical non-schema information: return type (paths), idempotent behavior, ZIP verification, and request limits. The output schema handles return values, so the description does not need to repeat them. The description is complete for a well-documented download tool.

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?

The input schema already provides comprehensive descriptions for all 6 parameters (100% coverage), so the baseline is 3. The description adds meaningful context about the download limit per call, which directly affects how many anios and cortes can be requested, and explains the fallback between formats (STATA→SPSS→CSV) which is referenced in the formato parameter. This adds value beyond the schema.

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?

The description clearly states the tool's function with a specific verb and resource: 'Descarga modulos al cache local.' It also distinguishes itself from siblings by explicitly stating 'NO devuelve microdatos, devuelve rutas,' making it clear this is a download-to-cache tool, not a data retrieval tool.

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

Usage Guidelines4/5

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

The description provides clear context for when to use the tool (downloading modules to cache) and what to expect (returns paths, not microdata). It does not explicitly name alternative tools, but the distinction from data-access tools implies when to use it. The idempotent cache behavior and download limit also help the user understand practical usage constraints.

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

enaho_descargar_documentacionA
Idempotent

Baja ficha tecnica, diccionario de variables y cuestionarios del anio.

Devuelve las rutas de los ZIP para que los leas despues con tus herramientas de archivos. El diccionario es lo que resuelve las dudas de definicion que ni el catalogo ni el indice pueden contestar.

ParametersJSON Schema
NameRequiredDescriptionDefault
anioYes
encuestaNoEncuesta del INEI sobre la que operar. Por defecto 'enaho'. Valores: enaho, enaho-panel, endes, enapres, enut, enares, ena, epen-departamentos, epen-ciudades, epen-lima, epe-lima, enapref, enco, cenagro, mapa-pobreza. Cada encuesta tiene sus propias llaves de union y su propio factor de expansion; no se pueden mezclar entre si.

Output Schema

ParametersJSON Schema
NameRequiredDescription

No output parameters

TDQS

A4/5.0
Behavior3/5

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

Annotations already provide safety hints (idempotent, non-destructive). The description adds that the tool returns ZIP paths for later reading with file tools, which is useful behavioral context, but it does not mention potential side effects, caching, or other operational details.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is concise: two sentences. The first sentence states the action and objects, the second explains the output format and the dictionary's purpose. No unnecessary words or repetition.

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?

Given that an output schema exists, the description does not need to list return fields. It provides sufficient context: what is downloaded, how the output is returned (ZIP paths), and why the dictionary is valuable. This is complete for a relatively simple documentation download tool.

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?

The description reinforces that the 'anio' parameter is the year ('del anio') and implies the dictionary is year-specific, but it adds no new semantic details about the 'encuesta' parameter beyond what the schema already provides. With 50% schema coverage, the description only marginally supplements the structured fields.

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?

The description clearly states the tool downloads technical sheets, variable dictionaries, and questionnaires for a given year ('Baja ficha tecnica, diccionario de variables y cuestionarios del anio'). The verb 'Baja' indicates the action, and the specific resources distinguish it from data download or search tools among the siblings.

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

Usage Guidelines4/5

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

It provides a concrete usage context by explaining that the dictionary resolves definition doubts that the catalog and index cannot. While it does not explicitly name alternative tools or exclusions, the purpose is clear enough to know when to use this tool versus others.

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

enaho_describir_moduloA
Read-onlyIdempotent

Ficha de un modulo: nivel, llaves, factor esperado, tamano y trampas.

Consultala antes de unir o estimar. Incluye el numero de variables y de filas segun el indice (sin descargar), si el modulo trae factor de expansion propio, y las notas de dominio que explican por que ese modulo pierde filas al unirse con otro.

ParametersJSON Schema
NameRequiredDescriptionDefault
anioYes
moduloYesCodigo del modulo: '01', '05', '34' (Sumaria)...
encuestaNoEncuesta del INEI sobre la que operar. Por defecto 'enaho'. Valores: enaho, enaho-panel, endes, enapres, enut, enares, ena, epen-departamentos, epen-ciudades, epen-lima, epe-lima, enapref, enco, cenagro, mapa-pobreza. Cada encuesta tiene sus propias llaves de union y su propio factor de expansion; no se pueden mezclar entre si.

Output Schema

ParametersJSON Schema
NameRequiredDescription

No output parameters

TDQS

A4.5/5.0
Behavior5/5

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

Annotations already mark it as read-only, idempotent, and non-destructive. The description adds substantial behavioral detail: it reports the number of variables and rows without downloading, indicates whether the module has its own expansion factor, and explains why rows are lost when joining. This goes well beyond annotations.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is two sentences, front-loaded with a high-level summary of what the tool returns, followed by practical details. It is concise with no wasted words, effectively communicating purpose and key behavioral facets.

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?

Given the tool is a metadata card, the description covers the main outputs, the use case (before joining or estimating), and important behaviors (no download, row-loss explanation). The presence of an output schema and rich annotations reduces the need for the description to explain return values in detail.

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 67% with some parameter descriptions (modulo and encuesta), but the tool description does not add additional parameter semantics. The description focuses on output content rather than clarifying the meaning or format of parameters like 'anio' or 'modulo'.

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?

The description clearly states it provides a 'Ficha de un modulo' with specific elements: nivel, llaves, factor esperado, tamano y trampas. This is a specific verb+resource+output summary that distinguishes it from sibling tools like listing or downloading modules.

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

Usage Guidelines4/5

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

The description explicitly says 'Consúltala antes de unir o estimar', giving clear context for when to use the tool. However, it doesn't explicitly name alternative tools or provide exclusion criteria, only implies this is a preliminary step to joining or estimating.

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

enaho_desigualdadA
Read-onlyIdempotent

Desigualdad con error estandar que respeta el diseno muestral.

El Gini y los percentiles no son funciones suaves de totales, asi que la linealizacion de Taylor no aplica. El error estandar sale por bootstrap rescalado de Rao-Wu-Yue, que remuestrea CONGLOMERADOS dentro de estrato: remuestrear filas ignoraria la correlacion intraclase y daria un error estandar tan optimista como el de un muestreo aleatorio simple.

Cuidado con los ingresos negativos: el Gini los admite pero puede salir fuera de [0,1], y el Theil los descarta. La herramienta avisa si los hay.

ParametersJSON Schema
NameRequiredDescriptionDefault
porNoDesagregacion.
datasetYesDataset preparado.
encuestaNoEncuesta del INEI sobre la que operar. Por defecto 'enaho'. Valores: enaho, enaho-panel, endes, enapres, enut, enares, ena, epen-departamentos, epen-ciudades, epen-lima, epe-lima, enapref, enco, cenagro, mapa-pobreza. Cada encuesta tiene sus propias llaves de union y su propio factor de expansion; no se pueden mezclar entre si.
replicasNoReplicas bootstrap. 200 para explorar, 500+ para publicar.
variableYesVariable de ingreso o gasto, ej. 'inghog1d' o 'gashog2d'.
indicadoresNoCuales calcular: gini, theil, p10/p25/p50/p75/p90, p90_p10, p80_p20, participacion_decil_superior, participacion_decil_inferior. Por defecto gini, p50, p90_p10 y participacion del decil superior.
peso_adicionalNoEj. 'mieperho'.

Output Schema

ParametersJSON Schema
NameRequiredDescription

No output parameters

TDQS

A4.4/5.0
Behavior5/5

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

Beyond the read-only/idempotent annotations, the description discloses critical behavioral details: resampling clusters within strata to avoid optimistic standard errors, handling of negative incomes (Gini can fall outside [0,1], Theil discards them), and that the tool warns about negatives. This adds substantial value beyond the annotations.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is concise yet thorough, with a front-loaded purpose followed by method rationale and practical warnings. Every sentence adds value, and the structure is logical and easy to follow.

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?

The description covers the methodology, edge cases, and usage guidance, which is complete for a complex tool with a companion output schema. It does not need to explain return values or parameters already documented in the schema. A small gap is not mentioning that 'dataset' must be prepared, but the schema covers that.

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% with rich parameter descriptions (e.g., encuesta values, replicas range, indicadores list). The description does not add meaning beyond what the schema already provides, so the baseline 3 applies.

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?

The description clearly states the tool computes inequality measures (Gini, percentiles, ratios) with standard errors that respect the survey design. It distinguishes itself from siblings by emphasizing the bootstrap method for complex survey data, making the purpose specific and non-generic.

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

Usage Guidelines4/5

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

The description explains when this tool is appropriate (when Taylor linearization does not apply) and provides guidance on the number of bootstrap replicas (200 to explore, 500+ to publish). However, it does not explicitly mention alternatives or exclusion cases, so it lacks explicit when-not-to-use guidance.

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

enaho_distribucionA
Read-onlyIdempotent

Reparto por deciles con participacion en el total y curva de Lorenz.

Los cortes son cuantiles PONDERADOS, asi que cada grupo contiene la misma poblacion y no el mismo numero de filas de la muestra. Es la lectura que acompana al Gini: dos distribuciones con el mismo Gini pueden repartirse de forma muy distinta entre el decil de abajo y el de arriba.

Las cifras son descriptivas y no llevan error estandar; para el Gini con intervalo de confianza usa enaho_desigualdad, que lo estima por bootstrap de conglomerados.

ParametersJSON Schema
NameRequiredDescriptionDefault
gruposNo10 para deciles, 5 para quintiles.
datasetYesNombre corto del dataset preparado.
encuestaNoEncuesta del INEI sobre la que operar. Por defecto 'enaho'. Valores: enaho, enaho-panel, endes, enapres, enut, enares, ena, epen-departamentos, epen-ciudades, epen-lima, epe-lima, enapref, enco, cenagro, mapa-pobreza. Cada encuesta tiene sus propias llaves de union y su propio factor de expansion; no se pueden mezclar entre si.
variableYesIngreso o gasto a repartir.
peso_adicionalNo'mieperho' habitualmente.

Output Schema

ParametersJSON Schema
NameRequiredDescription

No output parameters

TDQS

A4.7/5.0
Behavior5/5

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

Beyond the annotations (readOnly, idempotent, not destructive), the description discloses key behavioral details: cuts are weighted quantiles based on population rather than rows, and results are descriptive without standard errors. It also explains the conceptual relationship to the Gini coefficient, adding context not present in structured metadata.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is concise and front-loaded, with the purpose in the first sentence and supplemental detail in two short paragraphs. Every sentence earns its place, covering purpose, methodology, limitations, and alternative tools without redundancy.

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?

Given the tool's moderate complexity, rich schema descriptions, and existing output schema, the description is contextually complete. It explains the core functionality, key methodological nuance, and when to use a sibling tool, while the output schema handles return-value documentation.

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?

The input schema already provides descriptions for all five parameters (100% coverage), so the description does not need to compensate. It adds methodological context about weighted quantiles but does not elaborate on individual parameter semantics beyond what the schema already offers.

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?

The description opens with 'Reparto por deciles con participacion en el total y curva de Lorenz', which clearly and specifically states the tool computes distribution shares and Lorenz curves by weighted quantile groups. This distinguishes it from sibling tools like enaho_desigualdad, which is explicitly mentioned as the alternative for Gini with confidence intervals.

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?

The description gives explicit guidance on when to use this tool versus enaho_desigualdad: 'para el Gini con intervalo de confianza usa enaho_desigualdad'. It also clarifies that this tool is descriptive and lacks standard errors, advising the alternative for inferential needs.

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

enaho_documentacion_buscarA
Read-onlyIdempotent

Responde dudas de definicion citando el documento y la pagina.

Es la herramienta que cierra el hueco entre "el indice dice que la variable existe" y "se que significa". El indice de variables da el nombre y la etiqueta; esto da lo que dice el diccionario y el manual: universo, codigos, como se construyo.

Usala ANTES de dar por buena la interpretacion de una variable rara, y siempre antes de curar el perfil de una encuesta: es la unica fuente que permite pasar unas llaves de verificado: false a true.

Devuelve fragmentos con documento y pagina, nunca documentos enteros, y requiere haber convertido antes con enaho_documentacion_convertir.

ParametersJSON Schema
NameRequiredDescriptionDefault
anioNo
exactoNoExige palabra completa. Sin esto, buscar 'p207' encuentra tambien p2071 y p207b, que son otras preguntas.
limiteNo
terminoYesNombre de variable ('hw5', 'mieperho') o palabra ('linea de pobreza', 'informante seleccionado').
encuestaNoEncuesta del INEI sobre la que operar. Por defecto 'enaho'. Valores: enaho, enaho-panel, endes, enapres, enut, enares, ena, epen-departamentos, epen-ciudades, epen-lima, epe-lima, enapref, enco, cenagro, mapa-pobreza. Cada encuesta tiene sus propias llaves de union y su propio factor de expansion; no se pueden mezclar entre si.

Output Schema

ParametersJSON Schema
NameRequiredDescription

No output parameters

TDQS

A4.2/5.0
Behavior4/5

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

Las anotaciones ya declaran readOnlyHint=true e idempotentHint=true. La descripción añade contexto valioso: devuelve fragmentos y no documentos completos, y que es la única fuente que permite cambiar llaves de verificado de false a true. Esto va más allá de lo que las anotaciones proporcionan. No contradice las anotaciones; la referencia a 'pasar llaves' es sobre el flujo de trabajo, no una escritura directa.

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?

La descripción es breve pero contiene varias frases de valor. Está bien estructurada: empieza con la acción principal, luego justifica la utilidad, después da instrucciones de uso y finalmente describe el formato de respuesta. Cada oración aporta información útil, aunque podría condensarse sin pérdida.

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?

Dado que existe un output schema y anotaciones completas, la descripción no necesita explicar los valores de retorno. Cubre el propósito, cuándo usarla, el prerrequisito y el formato de retorno (fragmentos). No menciona posibles errores ni límites, pero eso no es esencial para un buscador con buena cobertura de esquema.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters2/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

El esquema cubre 60% (termino, exacto, encuesta tienen descripciones; anio y limite no). La descripción de la herramienta no compensa la falta de documentación de anio y limite. Solo aporta contexto general sobre búsqueda de definiciones, que ayuda a entender termino, pero no proporciona semántica para los parámetros sin descripción en el esquema.

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?

La descripción comienza con un verbo específico ('Responde dudas de definición') y nombra el recurso (documento y página). Además, aclara la diferencia con el índice de variables: 'El índice de variables da el nombre y la etiqueta; esto da lo que dice el diccionario y el manual'. Esto la distingue claramente de herramientas como enaho_buscar_variable.

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?

Se indica explícitamente cuándo usar la herramienta: 'ANTES de dar por buena la interpretación de una variable rara, y siempre antes de curar el perfil de una encuesta'. También se menciona un prerrequisito ('requiere haber convertido antes con enaho_documentacion_convertir') y un comportamiento a evitar (nunca devuelve documentos enteros). No se nombran alternativas pero se contrasta con el índice de variables.

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

enaho_documentacion_convertirA
Idempotent

Pasa a Markdown los PDF de documentacion del INEI para poder buscarlos.

El diccionario de variables, la ficha tecnica y el manual del encuestador son lo unico que responde "que mide exactamente esta variable" y "que universo cubre este modulo". Vienen como PDF dentro de ZIP: un documento de 493 paginas que no se puede buscar ni citar.

Convierte tambien lo que ya es texto, y ahi esta el material mas valioso que nadie mira: los ZIP de rutinas traen los .do de Stata con los que el INEI calcula la pobreza oficial.

ACOTA SIEMPRE con documentos salvo que el usuario pida la ola entera. Convertir solo el diccionario tarda un minuto; los 27 documentos, varios.

Despues de convertir, usa enaho_documentacion_buscar en vez de leer los archivos: devuelve el fragmento con su numero de pagina.

ParametersJSON Schema
NameRequiredDescriptionDefault
anioYes
forzarNoReconvertir aunque ya exista.
encuestaNoEncuesta del INEI sobre la que operar. Por defecto 'enaho'. Valores: enaho, enaho-panel, endes, enapres, enut, enares, ena, epen-departamentos, epen-ciudades, epen-lima, epe-lima, enapref, enco, cenagro, mapa-pobreza. Cada encuesta tiene sus propias llaves de union y su propio factor de expansion; no se pueden mezclar entre si.
documentosNoFragmentos del nombre del documento: ['diccionario'], ['sumaria', 'ficha']. Sin filtro se convierte la ola entera, que en la ENAHO son ~2 100 paginas y varios minutos.

Output Schema

ParametersJSON Schema
NameRequiredDescription

No output parameters

TDQS

A4.5/5.0
Behavior4/5

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

Annotations already declare idempotentHint=true and destructiveHint=false, and the description adds behavioral context by revealing that it also converts already-textual content and specifically highlights the value of Stata .do files. It does not contradict annotations, and the performance expectations add useful transparency beyond what annotations provide.

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 well-structured and front-loaded with the main purpose. Each sentence adds value—context, usage guidance, timing, and follow-up—but the length is at the upper bound of conciseness. The inclusion of 'por que' material (the Stata .do part) is valuable, so the length is earned.

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?

Given the tool's complexity and the existence of an output schema, the description is quite complete: it explains the tool's purpose, its valuable content, when to narrow with `documentos`, and the recommended next step. It doesn't mention prerequistes like whether PDFs must be downloaded first, but this is a minor gap given sibling tools handle downloading.

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 75%, so the baseline is 3. The description adds real meaning by giving concrete examples for the `documentos` parameter (`['diccionario']`, `['sumaria', 'ficha']`) and explaining the consequence of no filter ('se convierte la ola entera'). It also reinforces the `encuesta` scope by mentioning the ENAHO, but doesn't elaborate on `anio`, which is slightly lacking.

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?

The description starts with 'Pasa a Markdown los PDF de documentacion del INEI para poder buscarlos' which clearly states the verb (convert to Markdown) and resource (INEI documentation PDFs). It differentiates from siblings like enaho_documentacion_buscar (search) and enaho_descargar_documentacion (download) by explicitly being the conversion step before searching.

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?

It gives explicit when-to-use guidance: 'ACOTA SIEMPRE con `documentos` salvo que el usuario pida la ola entera' and provides timing expectations (1 minute for dictionary, several for all 27 documents). It also recommends the alternative tool after conversion: 'usa enaho_documentacion_buscar en vez de leer los archivos', making the workflow clear.

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

enaho_estado_cacheA
Read-onlyIdempotent

Que hay descargado, cuanto ocupa y que datasets derivados existen.

Consultala antes de descargar en masa: la ENAHO completa de varios anios son varios GB, y muchas veces el modulo que hace falta ya esta bajado de una sesion anterior. Devuelve el desglose por anio, el espacio en disco y la lista de datasets preparados con su nombre corto, que es el que aceptan enaho_perfil, enaho_estimar y enaho_exportar.

ParametersJSON Schema
NameRequiredDescriptionDefault

No parameters

Output Schema

ParametersJSON Schema
NameRequiredDescription

No output parameters

TDQS

A4.5/5.0
Behavior4/5

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

Annotations already declare readOnlyHint=true, idempotentHint=true, destructiveHint=false. The description adds meaningful behavior context: it returns a year breakdown, disk space, and derived datasets, and notes that the short names are accepted by other tools (enaho_perfil, enaho_estimar, enaho_exportar). No contradiction with annotations.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is compact and well-structured: a one-sentence purpose statement followed by a practical usage tip. Every sentence contributes value—it explains what the tool returns and why to use it—without any fluff or redundancy.

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 read-only cache status tool with no parameters and an output schema, the description fully covers the return content (year breakdown, disk space, derived datasets) and the real-world use case (avoiding unnecessary large downloads). The tool's role in the ecosystem is clear.

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?

The tool has zero parameters, and the schema coverage is 100% (empty properties). The description doesn't need to add parameter info. Baseline for 0-parameter tools is 4, and the description focuses on the output rather than parameters, which is appropriate.

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?

The description immediately states 'Que hay descargado, cuanto ocupa y que datasets derivados existen' — a specific verb+resource+scope. It clearly distinguishes from siblings like enaho_descargar (download) and enaho_listar_modulos (list modules) by focusing on cache status rather than downloads or listings.

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

Usage Guidelines4/5

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

The description explicitly instructs when to use: 'Consultala antes de descargar en masa' and explains why (the full ENAHO is several GB, and modules may already be cached). It does not explicitly mention when-not-to-use or name alternatives, but the strong contextual guidance earns a 4.

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

enaho_estimarA
Read-onlyIdempotent

Estimacion ponderada con error estandar e IC que respetan el diseno.

Esta herramienta existe para evitar el error clasico de tesis: sacar el promedio simple de una encuesta estratificada por conglomerados y reportarlo como si describiera al pais. El factor de expansion no es opcional y el error estandar ingenuo subestima la varianza real.

Metodo: linealizacion de Taylor con estimador de conglomerado ultimo (estratos x UPM), t de Student con gl = n_conglomerados - n_estratos, e IC en escala logit para proporciones.

IMPORTANTE sobre el universo. Para indicadores de POBLACION que deban reproducir cifras oficiales (pobreza, ingreso per capita), usa un dataset a nivel HOGAR con peso_adicional="mieperho". Ponderar las filas del roster de personas solo con factor07 expande a un universo mayor -- incluye trabajadores del hogar y pensionistas-- y da una cifra parecida pero distinta de la del INEI. La herramienta lo detecta y lo advierte, pero es mejor pedirlo bien de entrada.

Cada celda trae su coeficiente de variacion y un campo confiable: por encima de CV 15 % el INEI considera la estimacion no publicable, porque el dominio tiene muestra insuficiente.

ParametersJSON Schema
NameRequiredDescriptionDefault
porNoVariables de desagregacion, por ejemplo ['departamento'] o ['dominio','area']. El diseno completo se mantiene: no se filtra la muestra, se usa un indicador de dominio.
valorNoCategoria de interes cuando estadistico='proporcion'.
factorNoColumna del factor. Si se omite se detecta (factor07, factor...).
datasetYesDataset preparado con enaho_unir_modulos.
encuestaNoEncuesta del INEI sobre la que operar. Por defecto 'enaho'. Valores: enaho, enaho-panel, endes, enapres, enut, enares, ena, epen-departamentos, epen-ciudades, epen-lima, epe-lima, enapref, enco, cenagro, mapa-pobreza. Cada encuesta tiene sus propias llaves de union y su propio factor de expansion; no se pueden mezclar entre si.
estratosNoColumna de estratos (por defecto 'estrato').
variableYesVariable a estimar, por ejemplo 'inghog1d'.
estadisticoNo'proporcion' requiere una variable 0/1 o que indiques `valor` con la categoria de interes (ej. valor=1 sobre `pobreza`).media
conglomeradosNoColumna de UPM (por defecto 'conglome').
peso_adicionalNoColumna que multiplica al factor. Usa 'mieperho' para expandir un archivo a nivel HOGAR a poblacion: es el metodo con el que el INEI calcula la pobreza que publica.
nivel_confianzaNo

Output Schema

ParametersJSON Schema
NameRequiredDescription

No output parameters

TDQS

A4.3/5.0
Behavior5/5

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

Annotations already declare readOnly, idempotent, and non-destructive. The description adds substantial behavioral detail: the Taylor linearization method, degrees of freedom, logit-scale confidence intervals for proportions, automatic detection/warning about the universe issue, and the output fields (CV and confiable). This far exceeds annotation coverage.

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 well-structured with clear sections: summary, motivation, method, the 'IMPORTANTE' universe caveat, and output interpretation. Each paragraph serves a purpose, though the motivation paragraph could be tightened. The critical usage note is prominently highlighted.

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?

Given the tool's complexity (survey design, 11 parameters) and the presence of a rich input schema and output schema, the description covers all essentials: what it does, the method, the main usage pitfall, and how to interpret reliability. It omits nothing critical for basic usage.

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 91%, so baseline is 3. The description adds valuable semantic context for key parameters: it explains that peso_adicional='mieperho' is the correct method for official population figures, and clarifies the role of the factor expansion. This goes beyond the schema's field descriptions.

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?

The description clearly states the tool's purpose: design-weighted estimation with standard error and confidence intervals. It explains the problem it solves (avoiding simple averages on complex survey data). However, it does not explicitly distinguish from sibling tools like enaho_tabla_cruzada or enaho_regresion, which may also perform survey-weighted analyses.

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

Usage Guidelines4/5

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

The description provides clear guidance on when to use the tool: for design-based estimates where factor expansion is mandatory. It also gives a critical usage rule for population indicators (use peso_adicional='mieperho' to reproduce official figures). It does not explicitly mention alternatives or exclusions, but the context is sufficient.

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

enaho_exportarA
Idempotent

Convierte un dataset preparado al formato que use tu equipo.

Con etiquetas=True el .dta sale con etiquetas de variable y de valor, que es lo que lo hace usable en Stata. Si el dataset supera el limite de filas de Excel, la herramienta se niega en vez de generar un archivo truncado sin avisar.

ParametersJSON Schema
NameRequiredDescriptionDefault
salidaNoNombre del archivo de salida.
datasetYesDataset a exportar.
formatoNo'dta' para Stata con etiquetas, 'sav' para SPSS, 'csv' universal. 'xlsx' falla por encima de un millon de filas, a proposito.dta
columnasNoSubconjunto de columnas a exportar.
etiquetasNoEscribe etiquetas de variable y de valor (solo dta y sav).

Output Schema

ParametersJSON Schema
NameRequiredDescription

No output parameters

TDQS

A4.5/5.0
Behavior5/5

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

Beyond the annotations (idempotentHint true, destructiveHint false), the description discloses important behavioral details: the Excel row-limit refusal prevents silent truncation, and etiquetas=True ensures Stata usability. These are significant additional traits not covered by annotations.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is two sentences, front-loaded with the core purpose, and every sentence adds value—one for the main conversion function and one for key behavioral caveats. There is no redundancy or fluff.

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 simple export tool with a full input schema, output schema, and annotations, the description covers the essential usage context and distinctive behaviors (Stata labels, Excel limit). It is sufficiently complete for an agent to select and invoke the tool correctly.

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 schema already explains formato options, etiquetas, and the Excel limit. The description adds little beyond what the schema provides, though it re-emphasizes the etiquetas behavior for Stata. This meets the baseline for full schema coverage.

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?

The description uses a specific verb ('Convierte') and resource ('dataset preparado') and clearly states the tool's purpose: converting a dataset to a desired output format. This clearly distinguishes it from sibling tools, which focus on data exploration, estimation, and other ENAHO-specific operations.

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

Usage Guidelines4/5

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

The description implies when to use the tool ('to convert a prepared dataset to a format your team uses') and adds practical guidance about etiquetas for Stata and the Excel row limit refusal. However, it does not explicitly state when not to use it or mention alternatives, though no direct alternative exists among siblings.

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

enaho_geografiaA
Idempotent

Descompone el ubigeo y anade nombres, dominio geografico y area.

Anade cod_<nivel>, el nombre del nivel, dominio_nombre (los ocho dominios del INEI) y area urbano/rural derivada del estrato. Guarda un dataset nuevo y deja el original intacto.

La tabla empaquetada cubre los 25 departamentos. Para provincia o distrito hay que importar una tabla oficial una vez con el comando de CLI enaho ubigeo importar; si no, esos nombres salen vacios y la herramienta lo dice.

ParametersJSON Schema
NameRequiredDescriptionDefault
nivelNoNivel geografico a derivar.departamento
salidaNoNombre del dataset resultante.
datasetYesDataset preparado que contenga 'ubigeo'.

Output Schema

ParametersJSON Schema
NameRequiredDescription

No output parameters

TDQS

A4.4/5.0
Behavior4/5

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

The description discloses non-obvious behaviors beyond annotations: it saves a new dataset and leaves the original intact, and it warns when names are empty due to missing imports. This complements the idempotentHint and destructiveHint annotations without contradicting them.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is concise and front-loaded with the primary action. It uses two short paragraphs: the first states what the tool does, and the second details a key prerequisite and its consequence. Every sentence earns its place with no filler.

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?

Given the tool's complexity (3 parameters, output schema present), the description covers the main behavior, output columns, side effects (new dataset), and an important prerequisite. It lacks explicit error-handling details, but the output schema and warnings cover most gaps.

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?

The input schema covers 100% of parameters, so the baseline is 3. The description adds value by explaining what the tool produces (cod_<nivel>, dominio_nombre, area) and by clarifying the dependency of the 'nivel' parameter on an external import for provincia/distrito. This deepens the semantic understanding of 'nivel' beyond its schema description.

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?

The description opens with a specific verb and resource: 'Descompone el ubigeo y anade nombres, dominio geografico y area' (decomposes ubigeo and adds names, geographic domain, and area). It clearly distinguishes this from sibling tools like enaho_ubigeo_buscar by focusing on dataset enrichment rather than search.

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

Usage Guidelines4/5

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

It provides clear context on when the tool works (packaged table covers 25 departments) and gives a prerequisite for province/district levels ('hay que importar una tabla oficial una vez'). It also explains the consequence (names come out empty) and that the tool warns, but it does not explicitly name alternative tools for these cases.

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

enaho_informeA
Idempotent

Redacta un informe ejecutando las estimaciones, no copiando numeros.

Le pasas la NARRATIVA y una especificacion de que calcular; el servidor corre las estimaciones con el diseno muestral completo y pinta los cuadros. Los numeros del documento no pasan por tu contexto, asi que no se degradan al recopiarlos.

Cada cuadro sale con sus notas al pie automaticas: la nota metodologica, las advertencias del calculo y el aviso de que celdas tienen CV por encima del 15 % y no son publicables.

Ejemplo de seccion de estimacion: {"tipo": "estimacion", "titulo": "Pobreza por region", "texto": "El cuadro 1 presenta la incidencia por departamento.", "dataset": "hogares2023", "variable": "pobreza", "estadistico": "proporcion", "valor": 1, "por": ["departamento"], "peso_adicional": "mieperho"}

Si una seccion falla, el resto del informe se genera igual y la seccion rota queda marcada dentro del documento con su sugerencia de arreglo.

ParametersJSON Schema
NameRequiredDescriptionDefault
autorNoAutor del informe.
salidaNoNombre del archivo, sin extension.
tituloYesTitulo del documento.
formatoNodocx para Word, xlsx con una hoja por cuadro, pdf para distribuir, md y html no necesitan dependencias extra.docx
seccionesYesLista de secciones. Cada una lleva 'tipo' y sus campos. Tipos: 'texto' (titulo, texto, parrafos), 'estimacion' (dataset, variable, estadistico, valor, por, peso_adicional), 'comparacion' (dataset, variable, variable_grupo, grupo_a, grupo_b), 'desigualdad' (dataset, variable, indicadores, por), 'cruce' (dataset, fila, columna), 'perfil' (dataset, variables), 'serie' (anio_inicio, anio_fin, modulos, variable), 'tabla' (columnas, filas) para numeros que ya tengas, 'salto' para cortar pagina.
subtituloNoSubtitulo o bajada.

Output Schema

ParametersJSON Schema
NameRequiredDescription

No output parameters

TDQS

A4.7/5.0
Behavior5/5

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

The description goes beyond the annotations by disclosing that the server runs the estimations with the full sample design, that numbers don't pass through the agent's context, that each table gets automatic footnotes including CV>15% warnings, and that partial failures are handled gracefully. These are valuable behavioral traits not conveyed by readOnlyHint/idempotentHint.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is front-loaded with the core purpose, followed by essential mechanics, an illustrative example, and error handling. Each sentence earns its place; there is no fluff. The length is appropriate for the tool's complexity.

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?

Despite the tool's complexity (multiple section types), the description covers the main workflow, input specs, failure handling, and accuracy rationale. With an output schema present, it doesn't need to detail return values. The description is sufficiently complete for an agent to select and invoke the tool correctly.

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?

The input schema has 100% coverage for all 6 parameters, so baseline is 3. The description adds a concrete example of an estimation section, showing fields like 'dataset', 'variable', 'estadistico', 'valor', 'por', 'peso_adicional', which clarifies the JSON structure beyond the schema's general list. It also explains the narrative concept, providing extra meaning.

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?

The description clearly states 'Redacta un informe ejecutando las estimaciones' (writes a report by running estimations), specifying both the action (redacta) and the resource (informe). It contrasts with copying numbers and distinguishes from sibling tools like enaho_estimar by emphasizing it is a report-generation tool that takes narrative and calculation specs.

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

Usage Guidelines4/5

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

The description provides clear context: you pass a narrative ('NARRATIVA') and a specification of what to calculate, and the server runs the estimations. It explains the input structure and failure behavior. However, it does not explicitly name alternative tools or state when not to use it (e.g., for single estimations, use enaho_estimar), so it lacks explicit exclusions.

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

enaho_listar_datasetsA
Read-onlyIdempotent

Datasets ya preparados, con su anio, modulos de origen, nivel y tamano.

Empieza por aqui cuando retomes una sesion: puede que el parquet que necesitas ya exista y te ahorres la descarga y la union. El campo nombre es el identificador corto que aceptan enaho_perfil, enaho_estimar, enaho_geografia y enaho_exportar.

ParametersJSON Schema
NameRequiredDescriptionDefault

No parameters

Output Schema

ParametersJSON Schema
NameRequiredDescription

No output parameters

TDQS

A4.5/5.0
Behavior4/5

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

Annotations already establish read-only and idempotent behavior. The description adds context that these datasets are pre-prepared and can save time, plus notes that the `nombre` identifier is integrated with other tools. This goes beyond basic safety traits and provides useful behavioral context.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is compact, front-loaded with the core purpose, and every sentence adds value. The first sentence states what the tool provides, the second gives usage guidance and cross-tool integration. No fluff or redundancy.

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?

Given the tool's simplicity (no parameters), rich annotations, and presence of an output schema, the description covers all necessary context. It explains what the datasets contain, when to use the tool, and how to use its output (`nombre`) downstream. This is complete for a listing tool.

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?

There are zero parameters, so the baseline is 4 per instructions. The description adds clarity about the output by listing the fields (year, source modules, level, size) and explaining the `nombre` identifier's role in other tools, which is useful even though parameters are absent.

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?

The description clearly states that this tool lists already-prepared datasets with attributes like year, source modules, level, and size. It uses the verb 'listar' implicitly through the resource description, and it distinguishes itself from other tools by focusing on pre-built parquet files rather than downloads or unions.

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

Usage Guidelines4/5

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

Provides clear guidance to start here when resuming a session, explicitly stating that it can save download and union work. It also mentions that the `nombre` field is accepted by other tools, implying a workflow. However, it does not explicitly name alternatives or give a 'when-not-to-use' scenario.

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

enaho_listar_encuestasA
Read-onlyIdempotent

Que encuestas del INEI sabe manejar este servidor, ademas de la ENAHO.

Consultala cuando el usuario pregunte por algo que la ENAHO no mide: salud materno-infantil, anemia y desnutricion (ENDES), seguridad ciudadana y acceso a servicios (ENAPRES), uso del tiempo (ENUT), violencia (ENARES), produccion agropecuaria (ENA) o empleo trimestral (EPEN).

Cada encuesta tiene sus propias llaves de union y su propio factor de expansion, declarados en su perfil. Las que salen con verificado=false funcionan, pero con llaves inferidas que conviene confirmar con enaho_perfil antes de publicar resultados. La respuesta incluye tambien las encuestas del catalogo que NO tienen perfil: se pueden descargar, pero el servidor no sabe como se unen.

ParametersJSON Schema
NameRequiredDescriptionDefault

No parameters

Output Schema

ParametersJSON Schema
NameRequiredDescription

No output parameters

TDQS

A4.9/5.0
Behavior5/5

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

Beyond annotations (readOnlyHint, idempotentHint), the description reveals that each survey has its own join keys and expansion factor, that verificado=false surveys have inferred keys requiring confirmation, and that catalog surveys without a profile can be downloaded but cannot be joined. These are meaningful behavioral details not present in annotations.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is well-structured: the first sentence states purpose, the second gives usage guidance, and the remaining sentences add important caveats about verification and profiles. Each sentence contributes distinct, non-redundant information.

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 zero-parameter list tool with an output schema and annotations, the description covers purpose, when to use, output characteristics (verificado flag, profiles), and limitations. It provides sufficient context for an agent to correctly select and invoke the tool.

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?

The tool has zero parameters, so the baseline of 4 is appropriate. The description adds no parameter-specific semantics, but none are needed since there are none.

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?

The description immediately states that the tool lists which INEI surveys the server can handle besides ENAHO, with a clear verb and resource. It further distinguishes itself by listing specific survey topics (ENDES, ENAPRE, ENUT, etc.), making it unique from siblings like enaho_listar_modulos and enaho_listar_datasets.

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?

It explicitly instructs to consult this tool when the user asks about topics ENAHO doesn't measure, providing concrete examples. It also recommends a follow-up action (confirm with enaho_perfil) for surveys with inferred keys, clarifying when additional verification is needed.

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

enaho_listar_modulosA
Read-onlyIdempotent

Modulos publicados ese anio, con su unidad de analisis y sus llaves.

Combina el catalogo del INEI (codigo, nombre, formatos) con la tabla de dominio (nivel hogar/persona/item y llaves de union). Los modulos con curado=false llevan un nivel inferido que conviene verificar.

ParametersJSON Schema
NameRequiredDescriptionDefault
anioYesAnio de la ENAHO.
encuestaNoEncuesta del INEI sobre la que operar. Por defecto 'enaho'. Valores: enaho, enaho-panel, endes, enapres, enut, enares, ena, epen-departamentos, epen-ciudades, epen-lima, epe-lima, enapref, enco, cenagro, mapa-pobreza. Cada encuesta tiene sus propias llaves de union y su propio factor de expansion; no se pueden mezclar entre si.

Output Schema

ParametersJSON Schema
NameRequiredDescription

No output parameters

TDQS

A4.1/5.0
Behavior4/5

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

Beyond annotations (read-only, idempotent), the description discloses the internal logic of combining catalog and domain data, and warns about inferred levels for curado=false modules. This adds behavioral nuance helpful for the agent, such as the need to verify those modules.

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 concise and front-loaded with the primary purpose. The second paragraph adds necessary technical context about data sources and quality caveats, but remains focused and does not waste words.

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?

Given the tool's simplicity, the existing output schema, and the annotations, the description adequately covers the main behavior and important caveats. It does not discuss edge cases such as empty years, but that falls outside the tool's core purpose and is not critical.

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?

The input schema already provides full documentation for both parameters (anio, encuesta), with 100% coverage. The description does not add further parameter-level meaning, only referring to the year generically. Therefore, the baseline of 3 is appropriate.

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?

The description clearly states the tool lists published modules for a given year, including their unit of analysis and keys. It distinguishes itself from siblings by specifying the combination of INEI catalog and domain table, and the mention of 'curado=false' adds scope.

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

Usage Guidelines4/5

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

The description provides clear context: use this tool to get an overview of modules for a year, with their analysis unit and join keys. It does not explicitly compare with alternatives, but the distinct focus on 'modulos' and the data combination logic imply a specific use case.

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

enaho_panel_armarA
Idempotent

Reestructura el panel de ancho a largo y cuantifica la atricion.

Devuelve unidades por ola, cuantas sobreviven a todas y la tasa de balanceo. NO asigna factor de expansion: el del panel hay que identificarlo con enaho_panel_inspeccionar y el manual, porque no coincide con el de la ENAHO anual.

ParametersJSON Schema
NameRequiredDescriptionDefault
anioYes
llavesNoLlaves de seguimiento. Si se omiten se infieren por unicidad y la respuesta lo marca como no verificado.
moduloNoModulo del panel.34
salidaNoNombre del dataset resultante.
variablesNoNombres BASE sin sufijo de anio: 'pobreza', no 'pobreza_19'. Si se omite se reestructuran todas.

Output Schema

ParametersJSON Schema
NameRequiredDescription

No output parameters

TDQS

A4.7/5.0
Behavior5/5

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

The description discloses key behavioral traits beyond annotations: it returns 'unidades por ola, cuantas sobreviven a todas y la tasa de balanceo' and explicitly states it does NOT assign an expansion factor. This adds meaningful context to the readOnlyHint=false and idempotentHint annotations without contradicting them.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is compact and front-loaded with the primary purpose, followed by a crucial caveat in a separate paragraph. Every sentence contributes useful information without redundancy.

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?

Given the rich input schema, annotations, and presence of an output schema, the description appropriately focuses on high-level behavior and the critical expansion-factor caveat. It does not need to restate return fields or parameter details because those are already captured structurally.

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 high (80%), with descriptions for llaves, modulo, salida, and variables. The tool description itself adds no parameter-level detail, so it does not compensate for the undocumented 'anio' parameter or enhance the schema semantics. Baseline of 3 is appropriate because the schema already carries the parameter documentation burden.

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?

The description opens with a specific verb and resource: 'Reestructura el panel de ancho a largo y cuantifica la atricion,' clearly stating both the transformation and the attrition quantification. This distinguishes it from sibling tools like enaho_unir_modulos and enaho_panel_inspeccionar, especially by adding the wide-to-long restructuring behavior.

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?

The description explicitly tells the agent when NOT to rely on this tool for expansion factors and directs to `enaho_panel_inspeccionar` and the manual as the correct alternative: 'NO asigna factor de expansion: el del panel hay que identificarlo con enaho_panel_inspeccionar y el manual.' This provides clear when-not and alternative guidance.

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

enaho_panel_inspeccionarA
Read-onlyIdempotent

Mira que hay de verdad dentro de un modulo del panel, sin suponer nada.

ENAHO Panel NO es la ENAHO anual apilada: viene en formato ancho, con variables sufijadas por anio, llaves de seguimiento propias y factores calibrados para la submuestra seguida. Usar factor07 de la anual sobre datos de panel da resultados que parecen razonables y estan mal.

Esta herramienta reporta las columnas reales: olas detectadas, variables sufijadas, llaves candidatas y las columnas que parecen factor. Usala antes de armar nada, con el manual del panel al lado.

ParametersJSON Schema
NameRequiredDescriptionDefault
anioYes
moduloNoModulo del panel, por defecto '34'.34

Output Schema

ParametersJSON Schema
NameRequiredDescription

No output parameters

TDQS

A4.3/5.0
Behavior4/5

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

Annotations already declare readOnly, idempotent, and non-destructive, so the bar is lower. The description adds behavioral context by stating it reports actual detected columns without assuming, and lists the categories of outputs (waves, suffixed variables, candidate keys, factor-like columns). No contradictions with annotations.

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 the core purpose and then provides crucial background (panel vs annual) and a usage directive. Each sentence adds value; however, the middle paragraph is slightly verbose and could be tightened while preserving the warning.

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?

Given the output schema exists and annotations cover safety, the description sufficiently explains the tool's purpose, the panel-specific context, and what outputs to expect (columns, keys, factors). It stops short of detailing error behaviors, but for an inspection tool with good schema/sibling context, it is complete.

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 50%; 'modulo' has a description and default, 'anio' does not. The description does not elaborate on parameter semantics, but the parameter names and schema constraints make them reasonably clear. It neither adds nor detracts, so baseline 3 is appropriate.

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?

The description explicitly states the tool inspects a panel module to reveal its actual columns ('Mira que hay de verdad...'), and distinguishes it from annual ENAHO and from panel-building tools by specifying it reports waves, suffixed variables, keys, and factors. This clearly differentiates it from siblings like enaho_describir_modulo and enaho_panel_armar.

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?

It provides explicit timing ('Usala antes de armar nada'), warns against using annual factor07 on panel data, and sets context that panel data is wide-format with suffixed variables. The guidance implies not to use annual ENAHO tools interchangeably and to use this as a precursor to enaho_panel_armar, making when-to-use clear.

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

enaho_perfilA
Read-onlyIdempotent

Tipo, faltantes, cuartiles y etiquetas de valor de cada variable.

Compacto a proposito: existe para decidir que hacer sin traer los microdatos al contexto. Tambien reporta el factor de expansion detectado y la unidad de analisis inferida por las llaves.

ParametersJSON Schema
NameRequiredDescriptionDefault
datasetYesNombre corto del dataset devuelto por enaho_unir_modulos.
variablesNoVariables a perfilar. Si se omite, se perfilan las primeras.
max_variablesNo

Output Schema

ParametersJSON Schema
NameRequiredDescription

No output parameters

TDQS

A4/5.0
Behavior4/5

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

Annotations already declare readOnlyHint, idempotentHint, and destructiveHint=false, which cover safety. The description adds valuable behavioral context: it is intentionally compact, does not load microdata into context, and reports detected expansion factor and inferred analysis unit. This goes beyond the annotations and is consistent with them.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is very concise: two sentences that front-load the core output and then add purpose and extra returned info. Every sentence earns its place with zero fluff.

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?

Given the tool has an output schema and clear annotations, the description covers the key returned elements and the rationale for using the tool. It does not explain all edge cases, but it is sufficient for a read-only profiling tool with a simple input schema.

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 67%, with dataset and variables documented in the schema. The description adds no extra parameter-level semantics; max_variables lacks a schema description and the description does not compensate. This is a borderline case where the schema does most of 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?

The description clearly states the output: type, missing values, quartiles, and value labels for each variable. It also mentions reporting the expansion factor and analysis unit, giving a specific resource. However, it does not explicitly name sibling tools to differentiate from, though the purpose is unambiguous.

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

Usage Guidelines4/5

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

The description provides clear context: it exists to decide what to do without bringing microdata into the context, implying use for quick exploratory checks. It does not mention when not to use it or name alternatives, but the use case is well implied.

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

enaho_pobreza_fgtA
Read-onlyIdempotent

Los tres indices FGT con error estandar bajo diseno complejo.

La incidencia (FGT0) cuenta cuantos estan bajo la linea; la brecha (FGT1) mide cuan lejos estan, y la severidad (FGT2) pondera mas a los que estan mas abajo. Una politica que saca de la pobreza a quien estaba justo debajo de la linea mueve FGT0 sin mover FGT2: por eso los tres se reportan juntos.

Avisa cuando el bienestar y la linea no parecen estar en la misma unidad, que es el error mas facil de cometer aqui y produce una incidencia cercana a cero que parece un hallazgo.

ParametersJSON Schema
NameRequiredDescriptionDefault
porNoVariables de desagregacion.
alfasNo0 incidencia, 1 brecha, 2 severidad. Por defecto los tres.
lineaYesNombre de la columna con la linea de pobreza ('linea' para pobreza total, 'linpe' para extrema), o un numero como texto para usar una linea fija en simulaciones.
datasetYesNombre corto del dataset preparado.
encuestaNoEncuesta del INEI sobre la que operar. Por defecto 'enaho'. Valores: enaho, enaho-panel, endes, enapres, enut, enares, ena, epen-departamentos, epen-ciudades, epen-lima, epe-lima, enapref, enco, cenagro, mapa-pobreza. Cada encuesta tiene sus propias llaves de union y su propio factor de expansion; no se pueden mezclar entre si.
variableYesVariable de bienestar, en la MISMA unidad que la linea. En la ENAHO la linea es per capita mensual, asi que el gasto anual del hogar hay que dividirlo por mieperho y por 12 antes.
peso_adicionalNo'mieperho' habitualmente.
nivel_confianzaNo

Output Schema

ParametersJSON Schema
NameRequiredDescription

No output parameters

TDQS

A4.2/5.0
Behavior4/5

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

Annotations already declare readOnly, idempotent, and non-destructive behavior, so the description adds value beyond them. It reveals that the tool issues a warning when the welfare variable and poverty line are in inconsistent units, which is a notable behavioral trait not captured by the annotations.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is concise at five sentences, each earning its place: a definition, a conceptual explanation of the indices, and a practical warning. It is front-loaded with the core purpose and contains no redundancy.

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?

The description covers the core purpose, index interpretations, and a key common error, while the input schema documents parameters and the output schema presumably covers return values. It could mention additional data preparation steps beyond unit matching, but for a complex statistical tool, this is adequately complete.

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?

With 88% schema description coverage, parameters are already well-documented. The description adds conceptual depth by explaining what the alphas parameter represents (0, 1, 2) and reinforces the critical unit-consistency requirement between variable and linea, complementing the schema's parameter details.

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?

The description opens with 'Los tres indices FGT con error estandar bajo diseno complejo', clearly identifying the tool as computing FGT poverty indices with standard errors under complex design. It further distinguishes FGT0, FGT1, and FGT2, making it distinct from sibling poverty/inequality tools.

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 explains the meaning of the three indices and why they are reported together, implying use for poverty measurement. However, it never explicitly states when to prefer this tool over alternatives (e.g., enaho_desigualdad) or mentions exclusion scenarios.

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

enaho_rastrear_variableA
Read-onlyIdempotent

Sigue una variable ola por ola y avisa si cambio de significado.

Usala ANTES de construir cualquier serie de tiempo. El INEI recicla codigos de variable entre anios, y ese es el error silencioso mas caro que se comete con la ENAHO: la serie sale, se ve razonable y esta mal.

Devuelve los anios en que aparece, las etiquetas distintas que tuvo, los huecos intermedios y alertas explicitas cuando la etiqueta cambia.

ParametersJSON Schema
NameRequiredDescriptionDefault
anio_maxNo
anio_minNo
encuestaNoEncuesta del INEI sobre la que operar. Por defecto 'enaho'. Valores: enaho, enaho-panel, endes, enapres, enut, enares, ena, epen-departamentos, epen-ciudades, epen-lima, epe-lima, enapref, enco, cenagro, mapa-pobreza. Cada encuesta tiene sus propias llaves de union y su propio factor de expansion; no se pueden mezclar entre si.
variableYesNombre exacto de la variable, por ejemplo 'p21' o 'pobreza'.

Output Schema

ParametersJSON Schema
NameRequiredDescription

No output parameters

TDQS

A4.1/5.0
Behavior4/5

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

Annotations already declare readOnlyHint=true, idempotentHint=true, and destructiveHint=false. The description adds valuable behavioral context: it warns about meaning changes, states what it returns (years, labels, gaps, alerts), and explains the underlying data issue. No contradiction, and the additional context goes beyond the simple read-only flag.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description consists of three sentences, each with a clear role: function, when to use with rationale, and output summary. No redundant information exists; every sentence earns its place. It is appropriately sized and front-loaded.

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?

The tool is contextualized well: it addresses the ENAHO time-series error, explains the problem, and states what the tool returns. With annotations and an output schema present, the description need not over-explain. Minor lack of parameter detail slightly reduces completeness.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters2/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

The description makes no reference to parameters; it only mentions 'variable' in a general sense. Schema coverage is 50% (encuesta and variable have descriptions, anio_min/max do not), and the description does not compensate by adding semantic meaning for the optional year parameters. This is a notable gap.

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?

The description clearly states the tool's function: 'Sigue una variable ola por ola y avisa si cambio de significado' (follows a variable wave by wave and warns if its meaning changed). This is a specific verb+resource that distinguishes it from siblings like enaho_serie or enaho_buscar_variable, emphasizing its unique role as a pre-time-series consistency check.

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

Usage Guidelines4/5

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

The description explicitly says 'Usala ANTES de construir cualquier serie de tiempo' (use it BEFORE building any time series) and explains the risk of variable code recycling. This provides clear when-to-use context without naming alternatives or when-not-to-use, so it falls just short of full explicitness.

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

enaho_regresionA
Read-onlyIdempotent

Regresion ponderada con errores estandar corregidos por el diseno.

Es el equivalente de svy: regress y svy: logit de Stata, y es lo que hay que usar en vez de correr statsmodels sobre el parquet: sin el factor los coeficientes describen a la muestra y no al pais, y sin el conglomerado los errores estandar se quedan tipicamente entre un 30 y un 60 % por debajo del real, lo que vuelve significativo lo que no lo es.

Devuelve coeficientes con error estandar, t, p-valor e IC; los grados de libertad son los del DISENO (conglomerados - estratos), no n - k. Para el logit los coeficientes van en escala log-odds: exponencialos para leerlos como razon de momios.

ParametersJSON Schema
NameRequiredDescriptionDefault
factorNoFactor explicito.
datasetYesNombre corto del dataset preparado.
familiaNo'lineal' (minimos cuadrados) o 'logit' (dependiente 0/1).lineal
encuestaNoEncuesta del INEI sobre la que operar. Por defecto 'enaho'. Valores: enaho, enaho-panel, endes, enapres, enut, enares, ena, epen-departamentos, epen-ciudades, epen-lima, epe-lima, enapref, enco, cenagro, mapa-pobreza. Cada encuesta tiene sus propias llaves de union y su propio factor de expansion; no se pueden mezclar entre si.
estratosNoVariable de estratos.
categoricasNoSubconjunto de `explicativas` que debe expandirse a indicadoras. La primera categoria queda como referencia y el nombre del coeficiente la declara ('area=rural').
dependienteYesVariable a explicar. Continua para familia='lineal' (inghog1d, gashog2d), indicadora 0/1 para 'logit'.
explicativasYesVariables explicativas. La constante se anade sola.
conglomeradosNoVariable de UPM.
peso_adicionalNo'mieperho' para que cada hogar pese por sus miembros.
nivel_confianzaNo

Output Schema

ParametersJSON Schema
NameRequiredDescription

No output parameters

TDQS

A4.9/5.0
Behavior5/5

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

Beyond the annotations (readOnly, idempotent, non-destructive), the description discloses output details: coefficients, standard errors, t, p-value, confidence intervals, design-based degrees of freedom, and log-odds scale for logit. This is substantial behavioral context that annotations do not provide.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is structured into three focused paragraphs: definition, usage rationale, and output behavior. Every sentence earns its place without redundancy, making it concise yet information-dense for a complex statistical tool.

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?

Given the tool's complexity, the description plus schema and annotations provide a complete picture. It covers input requirements, statistical behavior, output interpretation, and common pitfalls. The output schema further completes the picture, so no critical aspect 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 91%, so the baseline is 3. The description adds meaning by explaining why factor and cluster matter, including the empirical consequence of omitting them (30-60% underestimated standard errors). Other parameters are already well-covered by the schema, so the description doesn't need to elaborate on all of them.

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?

The description clearly identifies the tool as survey-weighted regression with design-corrected standard errors, explicitly naming Stata's svy: regress and svy: logit equivalents. It distinguishes itself from running statsmodels on parquet, leaving no ambiguity about its function.

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?

It explicitly instructs to use this tool instead of statsmodels on parquet and explains why (factor for population inference, cluster for correct standard errors). This gives clear when-to-use guidance and names an alternative, even though it doesn't enumerate all sibling tools.

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

enaho_serieA
Idempotent

Repite la misma estimacion en cada anio del rango y devuelve la serie.

Descarga y une lo que falte reutilizando el cache, estima con el diseno complejo de CADA anio, y calcula la variacion respecto del anio previo.

Antes de estimar nada, comprueba en el indice si la variable existe en todo el rango y si su etiqueta cambio entre olas. Ese chequeo es el motivo principal de usar esta herramienta en vez de llamar a enaho_estimar en bucle: construir una serie sobre un codigo que el INEI reciclo con otro significado produce un grafico plausible y falso.

Ojo con los valores monetarios: salen a precios corrientes de cada anio. Para comparar en el tiempo hay que deflactarlos con el IPC, que no esta en la ENAHO.

ParametersJSON Schema
NameRequiredDescriptionDefault
porNoDesagregacion aplicada en todos los anios.
nivelNohogar
valorNoCategoria de interes si estadistico='proporcion'.
modulosYesModulos a unir en CADA anio, por ejemplo ['01','34'].
anio_finYesUltimo anio.
variableYesVariable a estimar cada anio.
anio_inicioYesPrimer anio.
estadisticoNomedia
peso_adicionalNo'mieperho' para indicadores de poblacion desde hogares.

Output Schema

ParametersJSON Schema
NameRequiredDescription

No output parameters

TDQS

A4.7/5.0
Behavior5/5

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

The description goes well beyond the annotations by disclosing internal behaviors: it downloads and merges missing data reusing the cache, estimates with each year's complex design, calculates year-over-year variation, and validates the variable across waves. This provides significant context about side effects and data quality checks that annotations alone do not convey.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is well-structured with the core action front-loaded, followed by process details, a rationale for choosing this tool, and a critical caveat about monetary values. Each sentence earns its place; it is information-dense without redundancy, appropriately sized for a complex tool.

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?

Given the tool's complexity (9 parameters, output schema available), the description is complete: it explains the workflow, the reason for its existence versus a loop, the side effects (download/cache), and a key interpretative warning. The presence of an output schema means return-value details need not be in the description.

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 high (78%) with parameter descriptions already present. The description adds global context (the same estimation is applied each year) but does not provide additional per-parameter meaning beyond what the schema already states. This aligns with the baseline 3 for high schema coverage.

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?

The description opens with a specific verb+resource statement: 'Repite la misma estimacion en cada anio del rango y devuelve la serie.' It clearly explains the tool's core function (produce a temporal series by repeating an estimation) and explicitly contrasts it with calling enaho_estimar in a loop, distinguishing it from its closest sibling.

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?

The description provides explicit guidance on when to use this tool instead of alternatives: it checks the index for variable existence and label changes, which is stated as the main reason to use it rather than looping over enaho_estimar. It also warns about monetary values requiring deflation, adding caution for interpretation.

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

enaho_sondear_llavesA
Idempotent

Descubre como unir dos modulos de una encuesta que nadie ha curado.

Usala cuando enaho_unir_modulos falle porque la encuesta no tiene llaves declaradas. El catalogo del INEI tiene 67 encuestas y solo 15 tienen perfil; para el resto, esto es lo que convierte "no se puede" en "estas son las candidatas y esta es la evidencia".

Descarga los modulos si hace falta y mira los datos reales: cardinalidad de cada columna, unicidad de cada combinacion y, sobre todo, el SOLAPAMIENTO de valores entre los dos archivos, que es la unica prueba de que la union va a emparejar algo.

El resultado sale SIEMPRE con inferido: true. Es inferencia: antes de publicar cifras construidas sobre una llave sondeada hay que contrastarla con el diccionario de la encuesta. Para las encuestas que SI tienen perfil, no uses esto: el conocimiento curado le gana a cualquier heuristica y la respuesta te lo recordara.

ParametersJSON Schema
NameRequiredDescriptionDefault
anioYes
corteNoDepartamento, en las encuestas que publican por cortes.
modulosYesCodigos de los modulos a unir. Pasa AL MENOS DOS: con uno solo no se puede medir el solapamiento, que es la senal que de verdad dice si una llave sirve.
encuestaNoEncuesta del INEI sobre la que operar. Por defecto 'enaho'. Valores: enaho, enaho-panel, endes, enapres, enut, enares, ena, epen-departamentos, epen-ciudades, epen-lima, epe-lima, enapref, enco, cenagro, mapa-pobreza. Cada encuesta tiene sus propias llaves de union y su propio factor de expansion; no se pueden mezclar entre si.

Output Schema

ParametersJSON Schema
NameRequiredDescription

No output parameters

TDQS

A4.6/5.0
Behavior5/5

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

The description discloses behavioral traits beyond the annotations: it downloads modules if needed ('Descarga los modulos si hace falta'), examines real data characteristics (cardinality, uniqueness, overlap), and always returns `inferido: true`. This adds context about side effects and output semantics that annotations (readOnlyHint=false, idempotentHint=true) do not specify.

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 longer than the minimal two-sentence example but is front-loaded with purpose and usage. Each sentence provides useful context (when to use, what it does, how to interpret results, when not to use). It is somewhat verbose with stylistic emphasis, but not wasteful.

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 complex inference tool, the description covers the essential decision-making context: why it exists, when to use it, what it does (download and inspect data), what the result always includes (`inferido: true`), and how to validate before publishing. The existence of an output schema means return details don't need to be spelled out. This is complete for the tool's complexity.

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 75%, and the description adds limited parameter-specific meaning beyond what's already in the schema. The `modulos` parameter's need for at least two modules is already described in the schema; the description reinforces it but does not add new semantics for `anio` or `corte`. Baseline 3 is appropriate.

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?

The description opens with a clear verb+resource: 'Descubre como unir dos modulos de una encuesta que nadie ha curado' (discover how to join two modules of an uncured survey). It further distinguishes itself from sibling `enaho_unir_modulos` by specifying it is for cases where that tool fails due to missing declared keys, and from profile-based tools by saying curated knowledge wins when a profile exists.

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?

Explicitly states when to use: 'Usala cuando `enaho_unir_modulos` falle porque la encuesta no tiene llaves declaradas' (use when enaho_unir_modulos fails because the survey has no declared keys). Also gives a clear exclusion: 'Para las encuestas que SI tienen perfil, no uses esto' (for surveys with a profile, don't use this), naming the alternative approach.

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

enaho_tabla_cruzadaA
Read-onlyIdempotent

Cruce ponderado con prueba de independencia corregida por diseno.

El chi-cuadrado de Pearson asume muestreo aleatorio simple: bajo conglomerados infla el estadistico y sale significativo lo que no lo es. Aqui se aplica la correccion de Rao-Scott por la traza de la matriz de efectos de diseno generalizados, con ajuste de segundo orden de los grados de libertad.

Se devuelven ambos estadisticos para que se vea la diferencia, mas el efecto de diseno promedio y cuantas celdas quedan bajo frecuencia esperada 5.

ParametersJSON Schema
NameRequiredDescriptionDefault
filaYesVariable categorica de las filas.
factorNoColumna del factor de expansion.
pruebaNoCalcula la prueba de independencia corregida.
columnaYesVariable categorica de las columnas.
datasetYesDataset preparado.
encuestaNoEncuesta del INEI sobre la que operar. Por defecto 'enaho'. Valores: enaho, enaho-panel, endes, enapres, enut, enares, ena, epen-departamentos, epen-ciudades, epen-lima, epe-lima, enapref, enco, cenagro, mapa-pobreza. Cada encuesta tiene sus propias llaves de union y su propio factor de expansion; no se pueden mezclar entre si.
estratosNoColumna de estratos.
conglomeradosNoColumna de UPM.
peso_adicionalNo'mieperho' para expandir un archivo de hogares a poblacion.

Output Schema

ParametersJSON Schema
NameRequiredDescription

No output parameters

TDQS

A4.2/5.0
Behavior4/5

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

The description goes beyond the annotations by disclosing specific return values: both uncorrected and corrected statistics, average design effect, and count of cells with expected frequency below 5. This rich output behavior is not implicit in readOnlyHint/idempotentHint and adds valuable transparency. Slightly more could be said about edge cases, but it is strong.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is well-structured and efficient: first sentence states purpose, second explains the statistical problem, third lists outputs. Every sentence earns its place, and it is front-loaded with the core function. Despite some technical density, it remains concise and scannable.

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?

Given the tool's complexity (9 parameters, survey design, statistical correction), the description is complete enough for an agent to understand what it does and what it returns. It covers the methodological rationale and output diagnostics. It doesn't mention every caveat, but the schema and output schema fill the remaining gaps, making a 4 appropriate.

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%, so the baseline is 3. The description does not add explicit parameter-level semantics beyond what the schema already provides; it focuses on the statistical method rather than explaining individual parameters. The context about design effects indirectly informs parameters like estratos/conglomerados, but not enough to raise the score.

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?

The description starts with 'Cruce ponderado con prueba de independencia corregida por diseno', clearly identifying the tool as a weighted cross-tabulation with a design-corrected independence test. It further specifies the Rao-Scott correction, distinguishing it from generic cross-tab or chi-square tools and from sibling tools like enaho_estimar or enaho_comparar.

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

Usage Guidelines4/5

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

The description provides clear context for when to use this tool: when Pearson's chi-square is inappropriate due to complex survey design (clustering), and a corrected test is needed. It explains why the correction is necessary, but does not explicitly state alternatives or exclusions, earning a 4 rather than 5.

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

enaho_ubigeo_buscarA
Read-onlyIdempotent

Busqueda inversa: nombre de lugar a codigo de ubigeo.

Util para filtrar una region sin salir a buscar el codigo a mano. El ubigeo son seis digitos (DD departamento, PP provincia, DD distrito) y la respuesta indica a que nivel corresponde cada acierto. La tabla base cubre los 25 departamentos; provincias y distritos aparecen solo si se importo una tabla oficial con enaho ubigeo importar.

ParametersJSON Schema
NameRequiredDescriptionDefault
limiteNo
nombreYesNombre del lugar, por ejemplo 'Arequipa'.

Output Schema

ParametersJSON Schema
NameRequiredDescription

No output parameters

TDQS

A4.1/5.0
Behavior4/5

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

Annotations already declare readOnlyHint=true, idempotentHint=true, and destructiveHint=false, establishing a safe read-only operation. The description adds behavioral context by explaining that 'la respuesta indica a que nivel corresponde cada acierto' and that the base table covers 25 departments with optional imported tables. This goes beyond annotations without contradicting them.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is three sentences, each serving a purpose: stating the core function, providing a practical use case, and explaining the response format and data coverage. It is front-loaded with the primary purpose and contains no unnecessary words.

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 simple read-only lookup tool with an output schema and strong annotations, the description covers essential context: the reverse search nature, the ubigeo format, and the data coverage limitation. However, it omits any mention of the 'limite' parameter behavior and does not address ambiguous or no-match cases, which keeps it from being fully complete.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters2/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

The schema describes 'nombre' with an example but leaves 'limite' without any description. The tool description does not explain the meaning or effect of 'limite' (e.g., that it controls the number of results). With schema coverage at only 50%, the description does not compensate for the missing parameter semantics, resulting in a clear gap.

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?

The description starts with 'Busqueda inversa: nombre de lugar a codigo de ubigeo' which is a specific verb+resource combination, clearly indicating a reverse lookup. It distinguishes from sibling tools, as no other sibling performs ubigeo lookup. The scope is clear: converting place names to codes, with the added detail about the six-digit structure.

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

Usage Guidelines4/5

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

The statement 'Util para filtrar una region sin salir a buscar el codigo a mano' provides a clear use case. It also notes the prerequisite that provinces and districts appear only if an official table was imported, offering context. However, it does not explicitly mention alternatives or exclusions, so it falls short of a 5.

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

enaho_unir_modulosA
Idempotent

Une modulos aplicando las llaves del nivel pedido y guarda un parquet.

Es la herramienta central. Hace tres cosas que un merge a mano suele equivocar: elige la base correcta (el modulo mas desagregado manda), normaliza el tipo de las llaves (conglome puede venir como texto en un modulo y como entero en otro) y cuenta las filas perdidas en cada paso.

Lee el bloque pasos_union de la respuesta: una tasa de emparejamiento baja puede ser legitima (el modulo 05 solo cubre personas de 14 anios a mas) o puede ser un merge roto, y la diferencia importa.

Devuelve el nombre del dataset, su forma y sus advertencias. NO devuelve microdatos: para analisis libre abre el parquet con pandas.

ParametersJSON Schema
NameRequiredDescriptionDefault
anioYes
nivelNoUnidad de analisis del resultado. 'persona' usa conglome+vivienda+hogar+codperso; 'hogar' omite codperso.hogar
cortesNoDepartamentos a apilar, en las encuestas que publican un archivo por departamento (cenagro, mapa-pobreza). Sin filtro se apilan todos, que es el dataset nacional.
salidaNoNombre del dataset resultante. Por defecto se autogenera.
modulosYesModulos del MISMO anio. Combinaciones tipicas: ['01','34'] a nivel hogar, ['02','05','34'] a nivel persona.
encuestaNoEncuesta del INEI sobre la que operar. Por defecto 'enaho'. Valores: enaho, enaho-panel, endes, enapres, enut, enares, ena, epen-departamentos, epen-ciudades, epen-lima, epe-lima, enapref, enco, cenagro, mapa-pobreza. Cada encuesta tiene sus propias llaves de union y su propio factor de expansion; no se pueden mezclar entre si.
descargar_si_faltaNoDescarga los modulos que no esten en el cache.

Output Schema

ParametersJSON Schema
NameRequiredDescription

No output parameters

TDQS

A4.7/5.0
Behavior5/5

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

The description goes well beyond the annotations. It discloses internal merge behavior (base selection, key type normalization, row loss counting), explains the `pasos_union` output block, and warns about interpreting low match rates. This is substantial behavioral context that the annotations (readOnlyHint, destructiveHint, idempotentHint) do not cover. No contradiction found.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is well-structured and front-loaded. It opens with the core purpose, then explains three critical merge behaviors, then guides the user on interpreting output, and finishes with a clear caveat about microdata. Every sentence carries value and there is no redundancy.

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?

Given the tool's central role, its 7 parameters, and the presence of an output schema, the description is remarkably complete. It explains what is returned (name, shape, warnings), what is not returned (microdata), how to interpret the `pasos_union` block, and why certain match rates are legitimate. The sibling context is also handled by identifying this as the central merge tool.

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 description coverage is high (86%), so the baseline is 3. The description adds meaningful context to parameters like `nivel` (applying the level's keys) and `modulos` (same-year requirement, typical combos), as well as explaining why key normalization matters. It doesn't detail every parameter, but the schema handles those well.

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?

The description begins with a clear verb and resource: 'Une modulos aplicando las llaves del nivel pedido y guarda un parquet' (merges modules applying the keys and saves a parquet). It further distinguishes this tool from siblings by detailing its unique merge logic (choosing the most disaggregated base, normalizing key types, counting lost rows) and positioning it as 'la herramienta central'.

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

Usage Guidelines4/5

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

The description establishes when to use this tool (for merging modules) and explicitly states a non-usage: 'NO devuelve microdatos: para analisis libre abre el parquet con pandas.' This provides a clear context and a 'when not to' for microdata access, though it doesn't name specific alternative sibling tools.

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

Tool Schema Changelog

Recent tool additions, removals, and schema changes observed during successful MCP inspections.

  1. 32 tool updatesv0.1.0
    • First observedenaho_actualizar_catalogo
    • First observedenaho_agregar_modulo
    • First observedenaho_buscar_variable
    • First observedenaho_calidad
    • First observedenaho_comparar
    • First observedenaho_descargar
    • First observedenaho_descargar_documentacion
    • First observedenaho_describir_modulo
    • First observedenaho_desigualdad
    • First observedenaho_distribucion
    • First observedenaho_documentacion_buscar
    • First observedenaho_documentacion_convertir
    • First observedenaho_estado_cache
    • First observedenaho_estado_catalogo
    • First observedenaho_estimar
    • First observedenaho_exportar
    • First observedenaho_geografia
    • First observedenaho_informe
    • First observedenaho_listar_datasets
    • First observedenaho_listar_encuestas
    • First observedenaho_listar_modulos
    • First observedenaho_panel_armar
    • First observedenaho_panel_inspeccionar
    • First observedenaho_perfil
    • First observedenaho_pobreza_fgt
    • First observedenaho_rastrear_variable
    • First observedenaho_regresion
    • First observedenaho_serie
    • First observedenaho_sondear_llaves
    • First observedenaho_tabla_cruzada
    • First observedenaho_ubigeo_buscar
    • First observedenaho_unir_modulos

TDQS

A4.1/5.0

Scored across 32 tools

Disambiguation5/5

Each tool targets a distinct stage of the ENAHO workflow: discovery, download, documentation, merging, quality, analysis, and reporting. Statistical tools clearly differ in output (e.g., means, cross-tabs, inequality, regression, poverty, distribution), and no two tools have obviously overlapping functionality.

Naming Consistency3/5

All tools share the consistent 'enaho_' prefix, but the pattern varies: some are verb_noun (listar_modulos), some noun_verb (documentacion_convertir), and many are single words (perfil, estimar). The mixed conventions are readable but not uniform.

Tool Count2/5

With 32 tools, this is well above the typical 3-15 range for a well-scoped server. While each tool has a specific purpose, the sheer number feels heavy and could overwhelm an agent; several statistical tools (e.g., estimar, pobreza_fgt, distribucion, serie) could be consolidated.

Completeness5/5

The tool set thoroughly covers the ENAHO lifecycle: catalog queries, downloads, caching, documentation conversion and search, merging, profiling, quality checks, key inference, weighted estimation, cross-tabs, comparison, inequality, geography, panel data, regression, poverty, distribution, time series, and report generation. No major operational gaps appear.

Maintenance

ActivityMaintained
ResponsivenessNo issues

Related MCP Connectors

Related MCP Servers

  • A
    license
    Not graded
    quality
    C
    maintenance
    MCP server for Peruvian public-data lookups including SUNAT RUC registrations, BCRP exchange rates, and SEACE tenders. Provides official open-data access through tools for Claude, Cursor, and other MCP clients.
    MIT
  • A
    license
    A
    quality
    C
    maintenance
    MCP server for the ESRU-EMOVI 2023 social mobility survey in Mexico. Enables AI assistants to query weighted statistics, transition matrices, and explore variables from the survey using natural language.
    11
    MIT
  • A
    license
    A
    quality
    B
    maintenance
    Connects MCP-compatible AI agents to Peru's official statistics platform (INEI Estadist), providing access to Census 2017 data, population indicators, and geographic profiles for all Peruvian departments, provinces, and districts without requiring an API key.
    9
    MIT