Skip to main content
Glama

query_dataset

Read-onlyIdempotent

Query real data from a dataset. Check instructions for featured dataset_ids and NOTES section for common filter patterns (municipal budgets, contracts, weather, energy, fuel prices).

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
limitNoNumber of rows to return. Min 1, max 100. Default 20. Use offset for pagination.
offsetNoNumber of rows to skip for pagination. Default 0. Combine with limit to navigate large results.
searchNoFree text search within dataset data. Works with Socrata ($q) and CKAN (q). For Diba and CIDO, use specific filters.
filtersNoKey-value filters where the key is the field name and the value is the filter value. Examples: {"municipi": "Barcelona"}, {"any": "2024"}, {"NOM_ENS": "Ajuntament de Tiana"}. Use list_dataset_fields to know valid field names.
dataset_idYesUnique dataset identifier in 'portal:id' format. Obtained from search_datasets results.

Schema Changelog

Changes observed during successful MCP inspections. Dates show when Glama detected each change.

  1. Changed5 schema fields changed
    • changedInput schema / properties / dataset_id / description
      Previous value: -"Identificador únic del dataset en format 'portal:id'. S'obté del camp dataset_id retornat per search_datasets."New value: +"Unique dataset identifier in 'portal:id' format. Obtained from search_datasets results."
    • changedInput schema / properties / filters / description
      Previous value: -"Filtres clau-valor on la clau és el nom del camp i el valor és el valor a filtrar. Exemples: {\"municipi\": \"Barcelona\"}, {\"any\": \"2024\"}, {\"institucioDesenvolupat\": \"Ajuntament de Tiana\"}. Usa list_dataset_fields per conèixer els noms de camps vàlids."New value: +"Key-value filters where the key is the field name and the value is the filter value. Examples: {\"municipi\": \"Barcelona\"}, {\"any\": \"2024\"}, {\"NOM_ENS\": \"Ajuntament de Tiana\"}. Use list_dataset_fields to know valid field names."
    • changedInput schema / properties / limit / description
      Previous value: -"Nombre de files a retornar. Mínim 1, màxim 100. Per defecte 20. Usa offset per paginar."New value: +"Number of rows to return. Min 1, max 100. Default 20. Use offset for pagination."
    • changedInput schema / properties / offset / description
      Previous value: -"Nombre de files a saltar per paginació. Per defecte 0. Combina amb limit per navegar per resultats grans."New value: +"Number of rows to skip for pagination. Default 0. Combine with limit to navigate large results."
    • changedInput schema / properties / search / description
      Previous value: -"Cerca de text lliure dins les dades del dataset. Funciona amb Socrata () i CKAN (q). Per a Diba i CIDO, usa filtres específics."New value: +"Free text search within dataset data. Works with Socrata ($q) and CKAN (q). For Diba and CIDO, use specific filters."
  2. First observed

TDQS

A3.5/5.0
Behavior3/5

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

Annotations already declare readOnlyHint=true and destructiveHint=false, providing the safety profile. The description adds useful context about featured datasets and common filter patterns (municipal budgets, contracts, weather, etc.) but does not disclose behavioral details such as pagination limits, result format, or response shape beyond what the schema already provides. This matches the 'annotations carry safety, description adds modest context' level.

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 sentences with no fluff: the first states the core function, the second directs to additional resources. Every word earns its place, making it appropriately sized and front-loaded with the primary purpose.

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?

The tool has 5 parameters and no output schema, so the description should compensate for the lack of return-value documentation. It clarifies that this tool returns real data and points to filter patterns, but it does not explicitly state the output format (e.g., rows/columns) or mention pagination behavior beyond the schema. This is adequate but leaves some gaps for a data-querying tool.

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%, with all five parameters (limit, offset, search, filters, dataset_id) having meaningful descriptions, so the description carries little burden. It does add value by pointing to NOTES for common filter patterns and mentioning 'featured dataset_ids', which helps with filter usage, but it does not provide parameter-specific detail beyond the schema.

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 states a clear action ('Query real data from a dataset') with a specific resource ('dataset'), which distinguishes it from metadata-focused siblings like get_dataset_info or list_dataset_fields. However, it does not explicitly differentiate from search_datasets, which also operates on datasets, and the mention of 'real data' is only a subtle cue that this tool retrieves actual data rows.

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?

The description implies when to use the tool ('Query real data') and instructs the agent to 'Check instructions for featured dataset_ids and NOTES section for common filter patterns', giving some contextual guidance. However, it does not explicitly state when not to use it or name alternatives like search_datasets for finding datasets, leaving the choice somewhat implicit.

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

Try in Browser

Glama MCP Gateway

Add one secure layer between your agents and this server.

TDQS

A4.2/5.0
Disambiguation5/5

Each tool has a unique purpose: search datasets, get metadata, list fields, list categories, list portals, query data, find related datasets, and search radio archives. There is no overlap between them, and the descriptions clearly distinguish when to use each.

Naming Consistency4/5

Most tools follow a verb_noun pattern (get_, list_, query_, search_), but 'related_datasets' breaks the pattern as a noun phrase. This is a minor inconsistency in an otherwise predictable naming scheme.

Tool Count5/5

With 8 tools, the set is well-scoped for a data catalog server. Each tool addresses a distinct need, and the count is neither too sparse nor overwhelming for effective agent use.

Completeness5/5

The tools cover the full spectrum of data discovery (search, categories, portals), inspection (metadata, fields), extraction (query), and exploration (related datasets). The additional radioteca search expands the domain without leaving gaps in the core open data workflow.