Skip to main content
Glama

Consultar los datos de un recurso (DataStore)

query_resource_data
Read-only

Query tabular CKAN DataStore resources without downloading: run full-text searches, apply exact filters, sort, and paginate records to retrieve needed Ecuador open data.

Instructions

Query a tabular CKAN resource through the DataStore without downloading it: full-text query, exact filters (filters_json), sort and pagination.

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": "query_resource_data"
  }
}

Input Schema

NameRequiredDescriptionDefault
rowsNoNumber of records to return (default 20, max 100)
sortNoOptional sort expression, e.g. "anio desc"
queryNoOptional full-text search across datastore fields
formatNotext summary (default) or json structured result.text
offsetNoPagination offset (default 0)
sourceNoCKAN portal; nacional (default), cuenca, latacunga or iadb.nacional
resource_idYesResource UUID (from list_dataset_resources)
filters_jsonNoOptional JSON object of exact field filters, e.g. '{"provincia":"Pichincha"}'

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. Changed8 schema fields changedv0.10.0
    • addedInput schema / properties / filters_json / description
      Added value: +"Optional JSON object of exact field filters, e.g. '{\"provincia\":\"Pichincha\"}'"
    • addedInput schema / properties / format / description
      Added value: +"text summary (default) or json structured result."
    • addedInput schema / properties / offset / description
      Added value: +"Pagination offset (default 0)"
    • addedInput schema / properties / query / description
      Added value: +"Optional full-text search across datastore fields"
    • addedInput schema / properties / resource_id / description
      Added value: +"Resource UUID (from list_dataset_resources)"
    • addedInput schema / properties / rows / description
      Added value: +"Number of records to return (default 20, max 100)"
    • addedInput schema / properties / sort / description
      Added value: +"Optional sort expression, e.g. \"anio desc\""
    • addedInput schema / properties / source / description
      Added value: +"CKAN portal; nacional (default), cuenca, latacunga or iadb."
  4. Changed10 schema fields changedv0.8.14
    • removedInput schema / properties / filters_json / title
      Removed value: -"Filters Json"
    • removedInput schema / properties / format / title
      Removed value: -"Format"
    • removedInput schema / properties / offset / title
      Removed value: -"Offset"
    • removedInput schema / properties / query / title
      Removed value: -"Query"
    • removedInput schema / properties / resource_id / title
      Removed value: -"Resource Id"
    • removedInput schema / properties / rows / title
      Removed value: -"Rows"
    • removedInput schema / properties / sort / title
      Removed value: -"Sort"
    • removedInput schema / properties / source / title
      Removed value: -"Source"
    • removedInput schema / title
      Removed value: -"query_resource_dataArguments"
    • removedOutput schema / title
      Removed value: -"query_resource_dataDictOutput"
  5. First observedv0.8.12

TDQS

B3.4/5.0
Behavior3/5

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

Annotations already declare readOnlyHint=true, destructiveHint=false and openWorldHint=true, so the safety profile is covered. The description adds that the query executes server-side against the DataStore rather than downloading, which is genuinely useful behavior. It does not disclose any limits on result volume, the cost of large offsets, or what happens when a resource is not DataStore-backed.

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?

A single dense sentence with the key differentiator ("without downloading it") placed early and the capabilities listed after it. Nothing is wasted, though the colon-list structure is terse enough that the enumeration runs together.

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?

An output schema exists, so return-value explanation is not required, and the schema documents all eight parameters. Still, for a tool spanning four distinct portals with 8 params, the description omits that filtering depends on knowing resource field names (from list_dataset_resources/dataset metadata), a piece of context an agent needs to use filters_json correctly.

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% and every parameter is documented in the schema, so the baseline of 3 applies. The description groups the parameters meaningfully (full-text query, exact filters_json, sort, pagination), but adds no syntax detail or constraints beyond what the schema already states, and never mentions the multi-portal source parameter.

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?

The description pairs the verb "Query" with a specific resource, "a tabular CKAN resource through the DataStore," and the qualifier "without downloading it" signals how it differs from download-oriented siblings. It does not name any sibling explicitly, so the differentiation is implied rather than stated.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines3/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

"without downloading it" implicitly tells an agent to prefer this tool when it needs records without fetching the file, and the enumerated capabilities (full-text, exact filters, sort, pagination) hint at the intended use cases. However, there is no explicit when-not guidance, no mention of preview_resource_data versus a full query, and no prerequisite such as the resource needing to be DataStore-enabled.

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