Skip to main content
Glama

Statistics Canada MCP Server

get_sdmx_structure

Read-only

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.

Input Schema

NameRequiredDescriptionDefault
productIdYes

Output Schema

NameRequiredDescriptionDefault
nameYes
_sdmx_urlYes
productIdYes
dimensionsYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A4.3/5.0
Behavior4/5

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

With readOnlyHint and openWorldHint already declared, the description adds genuinely new behavior: large codelists are truncated to 10 codes and flagged via _code_count/_truncated. That truncation caveat is exactly the kind of trap an agent needs warned about. It stops short of noting error/failure behavior or whether truncation can be bypassed.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

Front-loaded with purpose and the usage rule, then well-structured bullets for the return shape and key syntax. The trailing IMPORTANT citation mandate is useful but slightly off-topic for tool selection and adds bulk; otherwise nearly every line earns its place.

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?

An output schema exists, yet the description still supplies the key-construction grammar ("1.2.1", wildcards, "1+2.2.1" OR syntax, WDS/SDMX code equivalence) that no structured field conveys, which is the critical missing piece for downstream use. The productId meaning and truncation escape hatch remain unexplained, so it's strong but not complete.

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

Parameters3/5

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

Schema coverage is 0% — the single productId parameter has only a bare type and no description. The description refers to "a StatCan table" but never states that productId is that table's product ID or where to obtain it (e.g., from get_all_cubes_list or search_cubes_by_title). It compensates only indirectly.

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?

States a specific verb and resource ("Fetch the Data Structure Definition (DSD) for a StatCan table via SDMX REST") and names the exact deliverable (dimension codelists with code IDs, names, hierarchy). This distinguishes it cleanly from get_sdmx_data, query_sdmx, and get_sdmx_key_for_dimension.

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?

Explicitly says "Use this BEFORE get_sdmx_data to understand the key syntax for that table," naming the alternative and the sequencing condition. An agent can decide between this and get_sdmx_key_for_dimension / query_sdmx without further inference.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Try in Browser

Glama MCP Gateway

Add one secure layer between your agents and this server.