Skip to main content
Glama

Previsualizar los datos de un recurso

preview_resource_data
Read-only

Preview the first rows of a CKAN resource as a table to inspect CSV, JSON, Excel, ODS, or compressed CSV data before querying or downloading it.

Instructions

First rows of a CKAN resource as a table: CSV/TSV, JSON/GeoJSON, XLS/XLSX/XLSB, ODS, and ZIP/tar.gz wrapping a CSV. Max 5 MB; for DataStore resources prefer query_resource_data.

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": {
      "resource_id": "<resource_id>"
    },
    "name": "preview_resource_data"
  }
}

Input Schema

NameRequiredDescriptionDefault
rowsNoNumber of data rows to preview (default: 20, max: 100)
formatNotext summary (default) or json structured result.text
sourceNoCKAN portal; nacional (default), cuenca, latacunga or iadb.nacional
resource_idYesThe resource UUID (get it from list_dataset_resources)

Output Schema

NameRequiredDescriptionDefault
filasNo
sourceNo
columnasNo
metadatosYes
url_fuenteNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changedv0.15.0
    • changedOutput schema / (root)
      Previous value: -nullNew value: +{
      +  "properties": {
      +    "columnas": {},
      +    "filas": {},
      +    "metadatos": {
      +      "properties": {
      +        "contrato": {
      +          "const": "ecudatamcp.response.v1"
      +        }
      +      },
      +      "required": [
      +        "contrato"
      +      ],
      +      "type": "object"
      +    },
      +    "source": {},
      +    "url_fuente": {}
      +  },
      +  "required": [
      +    "metadatos"
      +  ],
      +  "type": "object"
      +}
  2. Changed1 schema field changedv0.13.0
    • changedOutput schema / (root)
      Previous value: -{
      -  "additionalProperties": true,
      -  "type": "object"
      -}New value: +null
  3. Changed4 schema fields changedv0.10.0
    • addedInput schema / properties / format / description
      Added value: +"text summary (default) or json structured result."
    • addedInput schema / properties / resource_id / description
      Added value: +"The resource UUID (get it from list_dataset_resources)"
    • addedInput schema / properties / rows / description
      Added value: +"Number of data rows to preview (default: 20, max: 100)"
    • addedInput schema / properties / source / description
      Added value: +"CKAN portal; nacional (default), cuenca, latacunga or iadb."
  4. Changed6 schema fields changedv0.8.14
    • removedInput schema / properties / format / title
      Removed value: -"Format"
    • removedInput schema / properties / resource_id / title
      Removed value: -"Resource Id"
    • removedInput schema / properties / rows / title
      Removed value: -"Rows"
    • removedInput schema / properties / source / title
      Removed value: -"Source"
    • removedInput schema / title
      Removed value: -"preview_resource_dataArguments"
    • removedOutput schema / title
      Removed value: -"preview_resource_dataDictOutput"
  5. First observedv0.8.12

TDQS

A4.2/5.0
Behavior3/5

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

The annotations already establish that this is a read-only, non-destructive, open-world operation. The description adds useful limits by stating the 5 MB maximum and the supported archive formats, but it does not explain truncation, error behavior for oversized files, or pagination beyond the fixed preview model.

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 two compact sentences with the main action and format scope front-loaded, followed by the key routing guidance. There is no redundant or filler wording.

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?

Given the output schema, annotations, and full parameter documentation, the description is nearly self-sufficient: it names the formats, states the size limit, and points to the preferred alternative for DataStore resources. Minor behavioral details, such as what happens when a file exceeds 5 MB, are left implicit.

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 100%, so the parameter descriptions already define rows, format, source, and resource_id. The description adds only broad context such as 'first rows' and the 5 MB limit, without clarifying parameter-specific behavior beyond the schema.

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 action and resource: 'First rows of a CKAN resource as a table'. It also lists supported formats and explicitly names the alternative tool for DataStore resources, making its scope distinguishable from query_resource_data.

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 an explicit routing rule: use preview_resource_data for file-based resources, but prefer query_resource_data for DataStore resources. The supported-format list further clarifies when this tool is appropriate.

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

Deploy Server

Other Tools