Skip to main content
Glama

get_sdmx_data

Read-only

Observations for productId + key, or one vectorId. Over 100 observations you get a per-series summary. Pass sql to compute over every row (growth, averages, ranking) server-side. Cite _sdmx_url.

Tool call template

This tool declares no required parameters. Add optional parameters from the input schema as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {},
    "name": "get_sdmx_data"
  }
}

Input Schema

NameRequiredDescriptionDefault
keyNoWith productId: one code per dimension in position order, joined by '.'; '+' for OR ('1+2.2'); empty for all members ('.2', includes totals).
sqlNoOne SELECT over all fetched rows as table 'data', returning only its result. Use it for growth, averages, rankings. Columns: one per dimension (non-alphanumerics → '_', double-quote them), period (TEXT), value (REAL), VECTOR_ID, UOM, STATUS.
fullNoEvery observation (max 500) instead of a summary when over 100.
formatNocsv: to save rows to a file, copy it verbatim. All observations (max 500), a row per series, a column per period; shared fields as '# name: value' lines.json
vectorIdNoInstead of productId + key: one series.
endPeriodNo
productIdNo
startPeriodNo'2020', '2020-01' or '2020-Q1'. Not with lastNObservations.
lastNObservationsNoLast N periods per series.

Output Schema

NameRequiredDescriptionDefault
_sdmx_urlYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed34 schema fields changed
    • removedInput schema / properties / endPeriod / anyOf
      Removed value: -[
      -  {
      -    "type": "string"
      -  },
      -  {
      -    "type": "null"
      -  }
      -]
    • removedInput schema / properties / endPeriod / default
      Removed value: -null
    • removedInput schema / properties / endPeriod / description
      Removed value: -"End period in YYYY or YYYY-MM format."
    • removedInput schema / properties / endPeriod / title
      Removed value: -"Endperiod"
    • addedInput schema / properties / endPeriod / type
      Added value: +"string"
    • addedInput schema / properties / format
      Added value: +{
      +  "default": "json",
      +  "description": "csv: to save rows to a file, copy it verbatim. All observations (max 500), a row per series, a column per period; shared fields as '# name: value' lines.",
      +  "enum": [
      +    "json",
      +    "csv"
      +  ],
      +  "type": "string"
      +}
    • changedInput schema / properties / full / description
      Previous value: -"Return every observation (max 500). Default: results over 100 observations come back as a per-series summary (latest, min, max, period range)."New value: +"Every observation (max 500) instead of a summary when over 100."
    • removedInput schema / properties / full / title
      Removed value: -"Full"
    • changedInput schema / properties / key / description
      Previous value: -"Dot-separated dimension codes in position order (e.g. '1.2.1'). Use '+' for OR ('1+2.2.1' = Geography 1 or 2). Omit a value for wildcard ('.2.1' = all geographies, Gender=2, Age=1). Code numbers match WDS memberIds — no translation needed. Call get_sdmx_structure first to see dimension positions and valid codes."New value: +"With productId: one code per dimension in position order, joined by '.'; '+' for OR ('1+2.2'); empty for all members ('.2', includes totals)."
    • removedInput schema / properties / key / title
      Removed value: -"Key"
    • removedInput schema / properties / lastNObservations / anyOf
      Removed value: -[
      -  {
      -    "type": "integer"
      -  },
      -  {
      -    "type": "null"
      -  }
      -]
    • removedInput schema / properties / lastNObservations / default
      Removed value: -null
    • changedInput schema / properties / lastNObservations / description
      Previous value: -"Return only the last N observations per series (e.g. 12 for one year of monthly data)."New value: +"Last N periods per series."
    • removedInput schema / properties / lastNObservations / title
      Removed value: -"Lastnobservations"
    • addedInput schema / properties / lastNObservations / type
      Added value: +"integer"
    • removedInput schema / properties / productId / title
      Removed value: -"Productid"
    • addedInput schema / properties / sql
      Added value: +{
      +  "description": "One SELECT over all fetched rows as table 'data', returning only its result. Use it for growth, averages, rankings. Columns: one per dimension (non-alphanumerics → '_', double-quote them), period (TEXT), value (REAL), VECTOR_ID, UOM, STATUS.",
      +  "type": "string"
      +}
    • removedInput schema / properties / startPeriod / anyOf
      Removed value: -[
      -  {
      -    "type": "string"
      -  },
      -  {
      -    "type": "null"
      -  }
      -]
    • removedInput schema / properties / startPeriod / default
      Removed value: -null
    • changedInput schema / properties / startPeriod / description
      Previous value: -"Start period in YYYY or YYYY-MM format."New value: +"'2020', '2020-01' or '2020-Q1'. Not with lastNObservations."
    • removedInput schema / properties / startPeriod / title
      Removed value: -"Startperiod"
    • addedInput schema / properties / startPeriod / type
      Added value: +"string"
    • addedInput schema / properties / vectorId
      Added value: +{
      +  "description": "Instead of productId + key: one series.",
      +  "type": "integer"
      +}
    • changedInput schema / required
      Previous value: -[
      -  "productId",
      -  "key"
      -]New value: +[]
    • removedOutput schema / $defs
      Removed value: -{
      -  "SDMXSeries": {
      -    "additionalProperties": true,
      -    "description": "One series: its constant fields (dimension labels, VECTOR_ID, UOM, ...) once.",
      -    "properties": {
      -      "_series_key": {
      -        "anyOf": [
      -          {
      -            "type": "string"
      -          },
      -          {
      -            "type": "null"
      -          }
      -        ],
      -        "default": null,
      -        "description": "Dot-separated SDMX key of this series.",
      -        "title": "Series Key"
      -      },
      -      "observations": {
      -        "anyOf": [
      -          {
      -            "items": {
      -              "items": {},
      -              "type": "array"
      -            },
      -            "type": "array"
      -          },
      -          {
      -            "type": "null"
      -          }
      -        ],
      -        "default": null,
      -        "description": "[period, value] pairs; value is a number or null (suppressed). Observations with their own attributes add a third element {field: label}.",
      -        "title": "Observations"
      -      }
      -    },
      -    "title": "SDMXSeries",
      -    "type": "object"
      -  }
      -}
    • removedOutput schema / properties / _message
      Removed value: -{
      -  "anyOf": [
      -    {
      -      "type": "string"
      -    },
      -    {
      -      "type": "null"
      -    }
      -  ],
      -  "default": null,
      -  "description": "Summary or truncation guidance.",
      -  "title": "Message"
      -}
    • removedOutput schema / properties / _sdmx_url / description
      Removed value: -"SDMX request URL — cite as the data source."
    • removedOutput schema / properties / _sdmx_url / title
      Removed value: -"Sdmx Url"
    • removedOutput schema / properties / _truncated
      Removed value: -{
      -  "description": "True if observations were capped at 500.",
      -  "title": "Truncated",
      -  "type": "boolean"
      -}
    • removedOutput schema / properties / row_count
      Removed value: -{
      -  "description": "Total observations returned by StatCan (before truncation).",
      -  "title": "Row Count",
      -  "type": "integer"
      -}
    • removedOutput schema / properties / series
      Removed value: -{
      -  "description": "Observations grouped by series.",
      -  "items": {
      -    "$ref": "#/$defs/SDMXSeries"
      -  },
      -  "title": "Series",
      -  "type": "array"
      -}
    • removedOutput schema / properties / series_count
      Removed value: -{
      -  "description": "Number of series in `series`.",
      -  "title": "Series Count",
      -  "type": "integer"
      -}
    • changedOutput schema / required
      Previous value: -[
      -  "_sdmx_url",
      -  "row_count",
      -  "series_count",
      -  "series",
      -  "_truncated"
      -]New value: +[
      +  "_sdmx_url"
      +]
    • removedOutput schema / title
      Removed value: -"SDMXRowsOutput"
  2. Changed10 schema fields changed
    • addedInput schema / properties / full
      Added value: +{
      +  "default": false,
      +  "description": "Return every observation (max 500). Default: results over 100 observations come back as a per-series summary (latest, min, max, period range).",
      +  "title": "Full",
      +  "type": "boolean"
      +}
    • addedOutput schema / $defs / SDMXSeries / properties / _series_key / anyOf
      Added value: +[
      +  {
      +    "type": "string"
      +  },
      +  {
      +    "type": "null"
      +  }
      +]
    • addedOutput schema / $defs / SDMXSeries / properties / _series_key / default
      Added value: +null
    • removedOutput schema / $defs / SDMXSeries / properties / _series_key / type
      Removed value: -"string"
    • addedOutput schema / $defs / SDMXSeries / properties / observations / anyOf
      Added value: +[
      +  {
      +    "items": {
      +      "items": {},
      +      "type": "array"
      +    },
      +    "type": "array"
      +  },
      +  {
      +    "type": "null"
      +  }
      +]
    • addedOutput schema / $defs / SDMXSeries / properties / observations / default
      Added value: +null
    • removedOutput schema / $defs / SDMXSeries / properties / observations / items
      Removed value: -{
      -  "items": {},
      -  "type": "array"
      -}
    • removedOutput schema / $defs / SDMXSeries / properties / observations / type
      Removed value: -"array"
    • removedOutput schema / $defs / SDMXSeries / required
      Removed value: -[
      -  "_series_key",
      -  "observations"
      -]
    • changedOutput schema / properties / _message / description
      Previous value: -"Truncation guidance, when truncated."New value: +"Summary or truncation guidance."
  3. Changed7 schema fields changed
    • addedOutput schema / $defs
      Added value: +{
      +  "SDMXSeries": {
      +    "additionalProperties": true,
      +    "description": "One series: its constant fields (dimension labels, VECTOR_ID, UOM, ...) once.",
      +    "properties": {
      +      "_series_key": {
      +        "description": "Dot-separated SDMX key of this series.",
      +        "title": "Series Key",
      +        "type": "string"
      +      },
      +      "observations": {
      +        "description": "[period, value] pairs; value is a number or null (suppressed). Observations with their own attributes add a third element {field: label}.",
      +        "items": {
      +          "items": {},
      +          "type": "array"
      +        },
      +        "title": "Observations",
      +        "type": "array"
      +      }
      +    },
      +    "required": [
      +      "_series_key",
      +      "observations"
      +    ],
      +    "title": "SDMXSeries",
      +    "type": "object"
      +  }
      +}
    • changedOutput schema / properties / _truncated / description
      Previous value: -"True if data was capped at 500 rows."New value: +"True if observations were capped at 500."
    • removedOutput schema / properties / data
      Removed value: -{
      -  "description": "Observation rows: dimension columns, period, value, and SDMX attributes.",
      -  "items": {
      -    "additionalProperties": true,
      -    "type": "object"
      -  },
      -  "title": "Data",
      -  "type": "array"
      -}
    • changedOutput schema / properties / row_count / description
      Previous value: -"Total rows returned by StatCan (before truncation)."New value: +"Total observations returned by StatCan (before truncation)."
    • addedOutput schema / properties / series
      Added value: +{
      +  "description": "Observations grouped by series.",
      +  "items": {
      +    "$ref": "#/$defs/SDMXSeries"
      +  },
      +  "title": "Series",
      +  "type": "array"
      +}
    • addedOutput schema / properties / series_count
      Added value: +{
      +  "description": "Number of series in `series`.",
      +  "title": "Series Count",
      +  "type": "integer"
      +}
    • changedOutput schema / required
      Previous value: -[
      -  "_sdmx_url",
      -  "row_count",
      -  "data",
      -  "_truncated"
      -]New value: +[
      +  "_sdmx_url",
      +  "row_count",
      +  "series_count",
      +  "series",
      +  "_truncated"
      +]
  4. First observed

TDQS

A3.8/5.0
Behavior4/5

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

Annotations only declare readOnly and openWorld, so the description carries most of the weight and does add real behavior: a 100-observation threshold that silently swaps rows for a per-series summary, server-side SQL execution that replaces the returned rows with the query result, and an instruction to cite the _sdmx_url field. It does not mention row caps (which only appear in parameter descriptions) or pagination, leaving some behavioral edges implicit.

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?

Four short sentences, front-loaded with the primary purpose and the mode choice, with zero filler. The extreme terseness ('Observations for productId + key') costs a little clarity but nothing is wasted.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness3/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

With 9 optional parameters and no required ones, the description never addresses what happens with an empty call, nor how sql interacts with the format=csv path that claims all observations. An output schema exists, so return-value explanation is not required, but the mode-interaction gaps leave the definition only adequate for a tool this complex.

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 78%, so the schema already documents most parameters in depth. The description reinforces the role of sql and the productId/key pairing but adds no syntax or constraint detail beyond what the schema states, so baseline 3 is right.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

States the specific resource ('Observations') and the two retrieval modes (productId + key, or a single vectorId), which is a concrete verb+resource statement. It does not explicitly contrast itself with siblings like get_series_info or get_sdmx_structure, so an agent must infer that this is the rows/values tool versus metadata tools.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines4/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

Gives clear routing between the two input modes ('productId + key, or one vectorId') and explains when the sql path is appropriate (growth, averages, ranking server-side). It stops short of naming a sibling alternative or stating exclusions such as when to prefer get_series_info first.

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.