get_sdmx_structure
Discover the structure of any Statistics Canada table: get dimension codelists, code IDs, and hierarchy to build correct SDMX keys for your data queries.
Instructions
Fetch the Data Structure Definition (DSD) for a StatCan table via SDMX REST.
Returns dimension codelists with code IDs, names, and parent hierarchy. Use this BEFORE get_sdmx_data to understand the key syntax for that table.
Each dimension entry includes:
id: dimension identifier (e.g. "Geography")
position: its slot in the dot-separated key string (1-based)
codelist: the SDMX codelist ID (e.g. "CL_Geography")
codes: list of {id, name, ?parent} — truncated to 10 for large codelists
_code_count / _truncated: total size and truncation flag
Key construction rules:
"1.2.1" = position-1 code 1, position-2 code 2, position-3 code 1
".2.1" = wildcard position 1 (all geographies), Gender=2, Age=1
"1+2.2.1" = Geography 1 or 2 (OR syntax)
WDS memberIds == SDMX codelist codes — no translation needed
IMPORTANT: In your final response to the user, you MUST cite the source of your data. This means including the _sdmx_url.
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"productId": "<productId>"
},
"name": "get_sdmx_structure"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| productId | Yes |