mcp-datos-abiertos-peru
Server Configuration
Describes the environment variables required to run the server.
| Name | Required | Description | Default |
|---|---|---|---|
| PNDA_URL | No | URL base del portal. | https://www.datosabiertos.gob.pe |
| PNDA_MAX_MB | No | Tope de lectura por CSV, en MB. | 300 |
| PNDA_LOG_DIR | No | Directorio de logs. | logs/ |
| PNDA_CACHE_DIR | No | Directorio de caché. | .cache/ |
| PNDA_TTL_HORAS | No | Vigencia del caché del catálogo (en horas). | 24 |
| PNDA_TIMEOUT_MS | No | Timeout de las llamadas a la API, en milisegundos. | 60000 |
| PNDA_USER_AGENT | No | Identificador del cliente. | mcp-datos-abiertos-peru/0.1 (...) |
Instructions
Guidance the server publishes about itself, which clients place ahead of the tool catalog so the model reads it before choosing anything.
This server publishes no instructions, or was last inspected before Glama recorded them.
Capabilities
Features and capabilities supported by this server
Protocol revision2025-11-25
| Capability | Details |
|---|---|
| tools | {
"listChanged": true
} |
| prompts | {
"listChanged": true
} |
| resources | {
"listChanged": true
} |
Tools
Functions exposed to the LLM to take actions
| Name | Description |
|---|---|
| buscar_datasetsA | Busca datasets en la Plataforma Nacional de Datos Abiertos del Perú por texto libre (ranking BM25 sobre título, entidad, etiquetas y descripción). Úsalo primero para encontrar qué datos existen. Devuelve el |
| ver_datasetA | Metadatos completos de un dataset y la lista de sus recursos (archivos) con su |
| listar_entidadesB | Entidades del Estado que publican datos en la PNDA, con su número de datasets (de mayor a menor). |
| previsualizar_recursoA | Lee solo el inicio de un recurso CSV y devuelve sus columnas (con tipo inferido y ejemplo) y las primeras filas. Úsalo SIEMPRE antes de consultar_recurso para conocer los nombres exactos de las columnas. |
| consultar_recursoA | 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 |
| actualizar_catalogoA | Vuelve a descargar el índice del catálogo desde la PNDA (normalmente no es necesario: se renueva cada 24 h). |
Prompts
Interactive templates invoked by user choice
| Name | Description |
|---|---|
| analizar_datos_publicos | Guía al modelo para responder una pregunta con datos de la PNDA, citando la fuente |
Resources
Contextual data attached and managed by the client
| Name | Description |
|---|---|
| resumen-catalogo | Totales del catálogo: datasets, recursos por formato y entidades con más publicaciones |
TDQS
Scored across 6 tools
Each tool targets a distinct stage of the workflow: free-text discovery (buscar_datasets), metadata inspection (ver_dataset), entity browsing (listar_entidades), CSV preview (previsualizar_recurso), and streaming query (consultar_recurso). Descriptions explicitly order them ("úsalo primero", "SIEMPRE antes de consultar_recurso"), leaving little risk of misselection. The only mild overlap is discovery via buscar_datasets vs listar_entidades, but one is text-ranked and the other is an entity ranking, so they are clearly separable.
All six names follow a strict Spanish verb_noun pattern in snake_case: buscar_datasets, ver_dataset, actualizar_catalogo, listar_entidades, previsualizar_recurso, consultar_recurso. Verbs differ meaningfully (search, view, refresh, list, preview, query) rather than being synonyms, so the pattern is both consistent and informative.
Six tools is well-scoped for an open-data catalog server: discovery, metadata, entity index, preview, query, plus one refresh operation. No tool feels redundant, and actualizar_catalogo is explicitly marked as rarely needed rather than a filler.
The surface covers the full discovery-to-analysis lifecycle for CSV resources, with preview preceding query to avoid column-name failures. Gaps remain: previsualizar_recurso and consultar_recurso only handle CSV, so XLSX/JSON/GeoJSON resources visible in ver_dataset become dead ends, and there is no export or cross-resource aggregation path. These are workaroundable but limit coverage for a portal that hosts many formats.