Calgary Query
calgary_queryRun a raw SoQL query against any Calgary open-data resource (data.calgary.ca) by its Socrata id (8-char like "iahh-g8bj"). Full SoQL: where/select/group/order/limit/offset. Use calgary_datasets to find a resource id, or calgary_recent for the common ones.
Example tool call
This call uses example arguments supplied in the tool’s input schema.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"limit": 100,
"where": "incident_year=2025",
"_apiKey": "your-data-calgary-api-key",
"resource_id": "iahh-g8bj"
},
"name": "calgary_query"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| group | No | SoQL $group (e.g. "incident_category"). | |
| limit | No | Max rows (default 100, max 5000). | |
| order | No | SoQL $order (e.g. "incident_datetime DESC"). | |
| where | No | SoQL $where filter (e.g. "incident_year=2025"). | |
| offset | No | Row offset for paging. | |
| select | No | SoQL $select (e.g. "incident_category, count(*)"). | |
| _apiKey | No | Optional, your own Socrata app token for higher rate limits. Omit to use the keyless endpoint. | |
| resource_id | Yes | Socrata resource id, e.g. "iahh-g8bj" (police incidents). |