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:
store_cube_metadata(productId=1234567) → stores all members + vectorIds, returns compact summary
query_database("SELECT * FROM _statcan_dimensions WHERE pid = 1234567") → see all dimension names and member counts
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
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
| Name | Required | Description | Default |
|---|---|---|---|
| productId | Yes | The StatCan cube ProductId whose full metadata to fetch and store. |