Skip to main content
Glama

OpenArg — Argentina public data

Calcular totales y rankings sobre una tabla de OpenArg

agregar_datos
Read-onlyIdempotent

Calcula en la base una suma, promedio, conteo, mínimo o máximo, opcionalmente agrupado.

Usala SIEMPRE que necesites un total, un promedio, un conteo, un mínimo/máximo o un ranking, en vez de traer filas con obtener_datos y hacer la cuenta vos: es exacta, no tiene el tope de 500 filas y gasta muchos menos tokens.

  • operacion: "suma", "promedio", "conteo", "minimo" o "maximo".

  • columna: la que se suma/promedia/etc. (nombres exactos de describir_tabla); no va con "conteo", que cuenta filas (si la mandás, da error). Las columnas de texto con números se leen según su formato (1.234,5 o 1,234.5); si el formato es ambiguo, no calcula y lo dice.

  • agrupar_por: hasta 3 columnas, p. ej. ["jurisdiccion_desc"] para un ranking.

  • filtros, desde, hasta, columna_fecha: como en obtener_datos (hasta 6 filtros).

  • ordenar_por: "valor" (por defecto, para rankings) o una columna de agrupar_por (p. ej. el año, para una serie). orden: "desc" (por defecto) o "asc".

  • limite: grupos a devolver, 1 a 200.

  • ponderar_por: la columna de ponderación de una encuesta (con "conteo" da la población estimada, no la cantidad de filas de la muestra). La respuesta dice sobre cuántas filas se calculó (filas_usadas, de todos los grupos) y si hay más grupos que limite. Si ninguna fila cumple los filtros no hay valor: dice qué valores existen. No descuenta preguntas.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
desdeNo
hastaNo
ordenNodesc
tablaYes
limiteNo
columnaNo
filtrosNo
operacionYes
agrupar_porNo
ordenar_porNo
ponderar_porNo
columna_fechaNo

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
resultYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. Added

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/destructive=false/openWorld), the description discloses a rich set of behavioral traits: no 500-row ceiling, token efficiency, error behavior for `columna` + "conteo", ambiguity handling for numeric text formats, and 'no descuenta preguntas'. It also describes response semantics (filas_usadas, truncation when groups exceed `limite`, behavior when no rows match). 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.

Conciseness4/5

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

The core guidance is front-loaded in the first two sentences and the rest is a tight per-parameter bullet list, so every line earns its place. It is longer than average, but the structure keeps it scannable rather than padded.

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 12 parameters and 0% schema coverage, the description covers the aggregate operation, grouping, ordering, weighting, filtering, and limit semantics, plus error and truncation behavior. An output schema exists, yet the description still explains key response fields, so nothing an agent needs to call this correctly is missing.

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

Parameters5/5

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

Schema description coverage is 0%, so the description must carry the full load, and it does: it defines `operacion` values, the `columna`/`conteo` incompatibility, `agrupar_por` (up to 3, with example), `limite` (1–200, narrower than the schema's default), `ordenar_por`/`orden` values and defaults, `ponderar_por` semantics, and ties `filtros`/`desde`/`hasta`/`columna_fecha` to the sibling's conventions. Only `tabla` is left implicit, which is self-evident.

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 states a specific verb and resource ('Calcula en la base una suma, promedio, conteo, mínimo o máximo, opcionalmente agrupado') and the title frames it as totals/rankings over an OpenArg table. It explicitly distinguishes itself from the sibling `obtener_datos`, so an agent can tell them apart without opening either schema.

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 ('Usala SIEMPRE que necesites un total... o un ranking') and names the alternative it replaces ('en vez de traer filas con `obtener_datos`'). The trade-offs (exact, no 500-row cap, fewer tokens) make the routing decision unambiguous.

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

Try in Browser

Glama MCP Gateway

Add one secure layer between your agents and this server.