Skip to main content
Glama
Aryan-Jhaveri

Statistics Canada MCP Server

store_cube_metadata

Fetches full cube metadata and stores it in SQLite tables, enabling complete dimension member and vector ID lookup with a compact summary.

Instructions

Fetches FULL metadata for a cube and stores it into two normalized SQLite tables (_statcan_dimensions, _statcan_members) without returning the full data to the context window.

Use this when you need to browse all dimension members or look up vectorIds. The summary returned by get_cube_metadata only shows 5 members per dimension — call this tool first, then use SQL to drill into specific dimensions.

Typical workflow:

  1. store_cube_metadata(productId=1234567) → stores all members + vectorIds, returns compact summary

  2. query_database("SELECT * FROM _statcan_dimensions WHERE pid = 1234567") → see all dimension names and member counts

  3. query_database("SELECT member_name_en, vector_id FROM _statcan_members WHERE pid = 1234567 AND dim_index = 2") → browse all members for a specific dimension

  4. fetch_vectors_to_database(vectorIds=[...], ...) → fetch the data

Tables are shared across multiple pids — calling this for a new pid adds rows without affecting data for other pids already stored.

Returns a compact summary: dimension names + member counts + example SQL.

IMPORTANT: Cite the productId and cubeTitleEn in your final response.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
productIdYesThe StatCan cube ProductId whose full metadata to fetch and store.
Behavior5/5

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

With no annotations, the description carries the full burden. It discloses that the tool writes to SQLite tables, does not return full data, returns a compact summary, and that tables are shared across pids with rows added without affecting other pids. It also notes the citation requirement. This is thorough and transparent.

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

Conciseness5/5

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

The description is longer than a simple one-liner, but it is well-structured with a clear opening sentence, a 'Use this when' section, a numbered workflow, and an important note. No sentence is wasted; the length is proportional to the tool's complexity.

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

Completeness5/5

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

Despite having only one parameter and no output schema, the description is extremely complete: it explains the storage side effects, the return summary, how to follow up with SQL queries, and the required citation. The integrated workflow makes it a self-contained guide.

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

Parameters4/5

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

Schema coverage is 100% for productId, so the baseline is 3. The description adds extra context by showing an example invocation (productId=1234567) and explaining how productId maps to the pid column in the stored tables, which is useful beyond the schema's basic type description.

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 explicitly states the tool 'Fetches FULL metadata for a cube and stores it into two normalized SQLite tables...' and distinguishes it from get_cube_metadata which only shows 5 members per dimension. This clearly identifies the tool's unique role.

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?

The description says 'Use this when you need to browse all dimension members or look up vectorIds' and explicitly contrasts with get_cube_metadata, while also providing a numbered workflow involving query_database and fetch_vectors_to_database, giving clear when-to-use and alternative guidance.

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

Install Server

Other Tools

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/Aryan-Jhaveri/mcp-statcan'

If you have feedback or need assistance with the MCP directory API, please join our Discord server