Skip to main content
Glama
aalises

Catalunya Open Data MCP

by aalises

socrata.query_dataset

socrata_query_dataset

Retrieve data from Catalunya open data Socrata datasets by constructing SODA queries. Use field names from the describe endpoint to filter, order, and paginate results.

Instructions

Query rows from a Catalunya open data Socrata dataset. Always call socrata_describe_dataset first and use returned field_name values, not display_name values. Pass clause values only, for example where: "municipi = 'Girona'"; never pass ?$where=... URL fragments. Supply order whenever using offset for stable pagination; without it, repeated calls may return duplicate or missing rows. Prefer narrowing filters or reducing $select over raising limit. Server caps row count and response bytes; truncation is signaled explicitly. Aggregate queries combine select with aggregate functions and group.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
groupNoRaw SODA $group clause value for aggregate queries.
limitNoRows to return. Server maximum: 100.
orderNoRaw SODA $order clause value. Supply this when using offset.
whereNoRaw SODA $where clause value using field_name values from describe.
offsetNoZero-based row offset for pagination.
selectNoRaw SODA $select clause value using field_name values from describe.
source_idYesSocrata dataset identifier, such as v8i4-fa4q.

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
dataYes
errorNo
provenanceYes
Behavior5/5

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

Despite no annotations, the description fully discloses key behaviors: server caps on rows/bytes, truncation signaling, aggregate query patterns, and stability requirements for pagination. No contradictions exist.

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?

Six concise sentences with front-loaded purpose. Every sentence adds unique value: prerequisite, usage rules, pagination, limits, aggregates. No redundancy.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness5/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Covers prerequisite (describe), query construction, pagination, limits, aggregates, and example. Output schema likely handles return values; no gaps for a query 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 already describes each parameter (100% coverage), so description adds limited semantic value. Usage patterns like passing clause values only and needing order with offset are helpful but not parameter-specific meaning.

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 clearly states the tool queries rows from a Catalunya open data Socrata dataset, distinguishing it from siblings like socrata_describe_dataset and socrata_search_datasets.

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?

Explicitly advises calling socrata_describe_dataset first and using field_name values, provides rules for order with offset, and recommends narrowing filters. Lacks explicit when-not-to-use but offers strong contextual guidance.

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

Install Server

Other Tools

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/aalises/catalunya-opendata-mcp'

If you have feedback or need assistance with the MCP directory API, please join our Discord server