Skip to main content
Glama
aalises

Catalunya Open Data MCP

by aalises

bcn.query_resource_geo

bcn_query_resource_geo

Run bounded geospatial queries on Open Data BCN resources using near, bbox, within_place, contains, and group_by with WGS84 coordinates.

Instructions

Run a bounded geospatial query over an Open Data BCN resource with WGS84 latitude/longitude columns. Works for DataStore-active resources and safe BCN-hosted CSV/JSON downloads; active near/bbox calls use generated CKAN SQL internally. Use near for distance queries, bbox for rectangular areas, within_place for district/neighborhood polygons returned by bcn_resolve_place.area_ref, contains for street/name text filters, and group_by for counts such as species by street. Coordinate fields are inferred from common BCN names such as latitud/longitud, geo_epgs_4326_lat/geo_epgs_4326_lon, and geo_epgs_4326_y/geo_epgs_4326_x; pass lat_field/lon_field when ambiguous.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
bboxNo
nearNo
limitNoRows to return. Server maximum: 100.
fieldsNo
offsetNo
filtersNo
containsNo
group_byNo
lat_fieldNo
lon_fieldNo
group_limitNo
resource_idYes
within_placeNo

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
dataYes
errorNo
provenanceYes
Behavior4/5

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

No annotations supplied, so description must disclose behavior. It mentions that active near/bbox calls use generated CKAN SQL internally and explains coordinate field inference. It does not explicitly state read-only nature or error behavior, but the geospatial focus and 'safe' mention imply non-destructive behavior.

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?

A single paragraph of five sentences, each adding distinct value: purpose, data sources, query types, coordinate inference, and fallback for ambiguous fields. No fluff, 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?

Given 13 parameters, nested objects, and an output schema, the description covers the core geospatial functionality and most important parameters. It lacks details on filters and pagination, but those are standard. Overall adequate for initial selection.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters4/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is only 8%, so the description compensates by explaining the main geospatial parameters (near, bbox, within_place, contains, group_by, lat_field, lon_field). However, it does not explain filters, offset, or fields, leaving some gap for complex filters.

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's purpose: running bounded geospatial queries over Open Data BCN resources with WGS84 coordinates. It distinguishes from sibling tools like bcn_query_resource by specifying geospatial capabilities and listing query types (near, bbox, within_place, etc.).

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?

Provides explicit when-to-use guidance: 'Use near for distance queries, bbox for rectangular areas, within_place for district/neighborhood polygons...'. It also clarifies that it works for DataStore-active resources and safe CSV/JSON downloads, setting prerequisites.

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