elections_canada_districts
Pack: elections-canada · Connect: https://pipeworx.io/mcp (see Connect below for a single-pack URL)
No MCP client? Call it directly: GET https://gateway.pipeworx.io/v1/tools/elections_canada_districts for the schema, then POST the same URL with its arguments for the data.
Find Canadian federal electoral districts (ridings) and their 5-digit district numbers from the Elections Canada official results for the 45th general election (2025). Filter by a name fragment and/or province. query is required; province optionally narrows it. Example: elections_canada_districts({ query: “Ottawa” }).
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
query | string | yes | Part of a district name, e.g. “Ottawa” or “Vanier”. Accents and dashes are ignored. |
province | string | no | Province or territory name, e.g. “Ontario”, or the 2-digit province prefix of the district number, e.g. “35”. |
Example call
Arguments
{
"query": "Ottawa"
}
curl
curl -X POST https://gateway.pipeworx.io/elections-canada/mcp \
-H 'Content-Type: application/json' \
-d '{"jsonrpc":"2.0","id":1,"method":"tools/call","params":{"name":"elections_canada_districts","arguments":{"query":"Ottawa"}}}'
TypeScript (@pipeworx/sdk)
import { Pipeworx } from '@pipeworx/sdk';
const pipeworx = new Pipeworx();
const result = await pipeworx.call('elections_canada_districts', {
"query": "Ottawa"
});
Response shape
| Field | Type | Description |
|---|---|---|
election | string | |
found | boolean | |
count | number | |
districts | array | |
as_of | string | |
source | string |
Full JSON Schema
{
"type": "object",
"properties": {
"election": {
"type": "string"
},
"found": {
"type": "boolean"
},
"count": {
"type": "number"
},
"districts": {
"type": "array",
"items": {
"type": "object",
"properties": {
"district_number": {
"type": "string"
},
"name": {
"type": "string"
},
"province": {
"type": "string"
}
},
"additionalProperties": true
}
},
"as_of": {
"type": "string"
},
"source": {
"type": "string"
}
},
"additionalProperties": true
}
Connect
Add this to your MCP client config — every tool in the catalog, including this one — or use one-click install buttons:
{
"mcpServers": {
"pipeworx": {
"url": "https://pipeworx.io/mcp"
}
}
}
Connect to just the elections-canada pack
{
"mcpServers": {
"elections-canada": {
"url": "https://gateway.pipeworx.io/elections-canada/mcp"
}
}
}
See Getting Started for client-specific install steps.