Skip to main content
Glama
mcp-datos-abiertos-peru

mcp-datos-abiertos-peru

Consultar recurso CSV

consultar_recurso

Filter and aggregate a full CSV without loading it into memory, returning counts, sums, averages, or grouped results for quantitative questions.

Instructions

Filtra y agrega un CSV completo en streaming (sin descargarlo a memoria) y devuelve el resultado calculado. Úsalo para responder preguntas cuantitativas ("¿cuántos…?", "¿cuánto se gastó…?", "top 5 de…"). Operadores: =, !=, contiene, empieza, en, >, >=, <, <= (comparación sin tildes ni mayúsculas; "en" acepta lista). Si no se indica agrupar_por, devuelve filas que cumplen los filtros. Revisa lectura_completa: si es false, el resultado es parcial.

Tool call template

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

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

Input Schema

NameRequiredDescriptionDefault
urlNo
limiteNoMáximo de grupos o filas devueltos
max_mbNoTope de lectura en MB (por defecto 300)
filtrosNo
columnasNoColumnas a devolver cuando no se agrupa
metricasNoPor defecto, contar filas
recurso_idNo
agrupar_porNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A3.8/5.0
Behavior3/5

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

No annotations are supplied, so the description carries the full behavioral burden: it discloses streaming/no-memory execution, accent- and case-insensitive comparison, list support for "en", row-vs-aggregate output depending on agrupar_por, and the `lectura_completa` partial-result flag. Still missing for a zero-annotation tool: access requirements, how the URL vs. recurso_id source is resolved, and any failure/limits behavior beyond max_mb.

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?

Front-loads the core action and mechanism before usage, operators, and the caveat; every sentence adds information and nothing is repeated from the schema. Density is high — nested parentheses and a mid-sentence operator list make it harder to scan than it needs to be.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness3/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Covers the aggregation semantics well, including the unlisted output field `lectura_completa`, which is valuable given there is no output schema. For an 8-parameter tool with no annotations and no required parameters, it still leaves the input-source question (url vs. recurso_id) and limite/columnas behavior unexplained, so an agent could construct a call that resolves no dataset.

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?

With 50% schema description coverage, the description adds real meaning for the operators (accent/case insensitivity, "en" takes a list) and explains what omitting agrupar_por does, which the schema does not. However, the two source parameters url and recurso_id are undocumented in both schema and description, and with zero required parameters the description never says that one of them must be supplied, leaving the most critical parameter decision unexplained.

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?

Names a specific verb pair ("Filtra y agrega") and resource ("un CSV completo en streaming, sin descargarlo a memoria"), plus the return shape ("devuelve el resultado calculado"). The emphasis on "completo" and no in-memory download functionally separates it from a preview-style sibling, so an agent can pick it for aggregation without opening another schema.

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?

Gives explicit when-to-use guidance with example question shapes ("¿cuántos…?", "¿cuánto se gastó…?", "top 5 de…") tied to quantitative questions. It stops short of stating when NOT to use it or naming the preview alternative for sampling, so there is no explicit routing rule between the two.

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