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 zipped CSV data (up to 5 MB). For DataStore resources, query data instead.

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.

Input Schema

TableJSON 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

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Schema Changelog

Changes observed during successful MCP inspections.

  1. 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."
  2. 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"
  3. First observedv0.8.12

TDQS

A4/5.0
Behavior4/5

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

Annotations already declare readOnlyHint=true/openWorldHint=true/destructiveHint=false, so safety is covered. The description adds a genuinely useful behavioral constraint beyond that: the 5 MB preview cap and the set of accepted formats, which affects whether the call will succeed. It does not describe failure modes for unsupported formats, but it meaningfully exceeds the annotation baseline.

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?

Two tightly packed sentences: purpose and formats first, then the size cap and the alternative routing. No filler, and the most decision-relevant information is front-loaded.

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?

An output schema exists, so return values need not be described, and the description covers formats, size limits, and the DataStore alternative. It leaves minor gaps around error/unsupported-format behavior, but is sufficient for correct invocation.

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 all four parameters (rows, format, source, resource_id) are already documented with defaults and constraints in the schema. The description adds no parameter-level detail (e.g., row limits or the source portals), so the baseline 3 applies.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

States a specific operation ('First rows of a CKAN resource as a table') and enumerates supported formats (CSV/TSV, JSON/GeoJSON, XLS/XLSX/XLSB, ODS, ZIP/tar.gz), which clearly frames it as a lightweight preview rather than a full download. It differentiates from query_resource_data but does not explicitly distinguish itself from other resource siblings like download_resource or get_resource_info.

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?

Provides an explicit routing rule: data larger than 5 MB is capped, and 'for DataStore resources prefer query_resource_data.' This gives a clear condition for choosing the alternative. It stops short of stating when-not-to-use cases (e.g., non-tabular resources) or a full exclusion list.

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