Skip to main content
Glama

Statcan Codeset

statcan_codeset
Read-onlyIdempotent

StatCan's reference code sets (WDS getCodeSets), the lookup tables every cube's metadata refers to by numeric/short code: frequency (monthly/annual/...), scalar factor (units/thousands/millions), status (footnote codes like 'not available for a specific period'), unit of measure (uom, ~465 units), subject (StatCan's ~622-entry subject-matter classification), survey (the ~900 StatCan surveys that produce the data), classification type, security level, symbol, and terminated-series flags. Use this to decode a frequencyCode/scalarFactorCode/statusCode/uomCode/subjectCode seen elsewhere in this pack's output, or to browse the subject/survey taxonomy. Returns the full set (English by default); pass codeset to fetch just one.

Example tool call

This call uses example arguments supplied in the tool’s input schema.

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

Input Schema

NameRequiredDescriptionDefault
codesetNoWhich code set to return. Omit for all ten.
languageNoen | fr (default en), which name/description fields to keep.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changed
    • changedInput schema / properties / language / description
      Previous value: -"en | fr (default en) — which name/description fields to keep."New value: +"en | fr (default en), which name/description fields to keep."
  2. Added

TDQS

A4.1/5.0
Behavior4/5

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

Annotations already cover readOnly/idempotent/non-destructive/openWorld. Beyond that, the description discloses the important behavioral fact that the default call returns ALL ten sets (a potentially large payload), with the sizes hinted (~465 units, ~622 subjects, ~900 surveys), and that language defaults to English. Return field structure is not described, but no output schema exists to shift that burden elsewhere.

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?

Purpose and the WDS endpoint are front-loaded, followed by the taxonomy list and then usage. The enumerated list is long and dense but each entry carries distinguishing information an agent would want; only minor tightening is possible.

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?

For a two-parameter, zero-required lookup tool with no output schema, the description covers what is returned (full set vs one set), the default language, and the purpose of each set. It omits the shape of individual records, which is a modest gap but not one that would cause a mis-call.

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 100% and the enum values and 'omit for all ten' default are already documented in the schema, so the baseline is 3. The description does add modest meaning by glossing what each set name represents (e.g. frequency = monthly/annual, scalar = units/thousands/millions) and confirming English-by-default, but this is largely reinforcement rather than new parameter semantics.

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?

The description states a specific verb+resource ("StatCan's reference code sets (WDS getCodeSets)") and enumerates exactly what each set contains — frequency, scalar factor, status, uom, subject, survey, classification type, security level, symbol, terminated flags. An agent can tell this is a lookup-table tool, distinct from data-fetching siblings like statcan_cube_data or statcan_series, without opening the schema.

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?

It gives explicit when-to-use guidance: decode a frequencyCode/scalarFactorCode/statusCode/uomCode/subjectCode seen elsewhere in the pack's output, or browse the subject/survey taxonomy. It stops short of naming a sibling alternative or stating when not to use it, so it is clear context without full routing.

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.