montreal_query
Pack: data-montreal · Endpoint: https://gateway.pipeworx.io/data-montreal/mcp
No MCP client? Call it directly: GET https://gateway.pipeworx.io/v1/tools/montreal_query for the schema, then POST the same URL with its arguments for the data.
Query any City of Montreal datastore resource (donnees.montreal.ca, CKAN) by its resource id (a UUID). Supports a free-text q, exact-match filters (field→value), sort (“field desc”), limit and offset. Use montreal_datasets to find a resource id, or montreal_recent for the common ones.
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
resource_id | string | yes | CKAN datastore resource id (UUID), e.g. “2cfa0e06-9be4-49a6-b7f1-ee9f2363a872”. |
q | string | no | Free-text search across columns. |
filters | object | no | Exact-match filters as a JSON object, e.g. {“district”:“B2”}. |
sort | string | no | Sort clause, e.g. “DDS_DATE_CREATION desc”. |
limit | number | no | Max rows (default 100, max 1000). |
offset | number | no | Row offset for paging. |
Example call
Arguments
{
"resource_id": "2cfa0e06-9be4-49a6-b7f1-ee9f2363a872",
"limit": 100
}
curl
curl -X POST https://gateway.pipeworx.io/data-montreal/mcp \
-H 'Content-Type: application/json' \
-d '{"jsonrpc":"2.0","id":1,"method":"tools/call","params":{"name":"montreal_query","arguments":{"resource_id":"2cfa0e06-9be4-49a6-b7f1-ee9f2363a872","limit":100}}}'
TypeScript (@pipeworx/sdk)
import { Pipeworx } from '@pipeworx/sdk';
const pipeworx = new Pipeworx();
const result = await pipeworx.call('montreal_query', {
"resource_id": "2cfa0e06-9be4-49a6-b7f1-ee9f2363a872",
"limit": 100
});
More examples
{
"resource_id": "2cfa0e06-9be4-49a6-b7f1-ee9f2363a872",
"filters": {
"district": "B2"
},
"sort": "DDS_DATE_CREATION desc"
}
Connect
Add this to your MCP client config, or use one-click install buttons:
{
"mcpServers": {
"data-montreal": {
"url": "https://gateway.pipeworx.io/data-montreal/mcp"
}
}
}
See Getting Started for client-specific install steps.