Skip to main content
Glama

enaho_desigualdad

Read-onlyIdempotent

Estimates inequality indicators (Gini, Theil, percentiles) with design-correct standard errors from complex survey data using bootstrap resampling. Flags negative incomes.

Instructions

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.

Input Schema

TableJSON 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

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

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.

Install Server

Other Tools

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/AnderMC66/enaho-mcp'

If you have feedback or need assistance with the MCP directory API, please join our Discord server