Skip to main content
Glama

enaho_serie

Idempotent

Estimate a variable for each year of Peru's ENAHO survey, validate that the variable's meaning hasn't changed, and return a series with year-over-year variation.

Instructions

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.

Tool call template

Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {
      "anio_inicio": "<anio_inicio>",
      "anio_fin": "<anio_fin>",
      "modulos": "<modulos>",
      "variable": "<variable>"
    },
    "name": "enaho_serie"
  }
}

Input 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

NameRequiredDescriptionDefault

No arguments

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

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.