Skip to main content
Glama

get_cube_structure

Read-onlyIdempotent

Inspect a data cube's dimensions, measures, and licence to understand its structure before querying. Use it to identify filterable dimensions and codelists for SPARQL queries.

Instructions

Read a cube's dimensions and measures — what the cube contains.

Tells you which dimensions you can filter on (KeyDimension), which values are measured (MeasureDimension), and which dimensions carry code lists. It also returns the licence, which is frequently a Fedlex URI you can resolve with fedlex-mcp.

Call this to understand a cube before reading it, and to write a run_sparql query against it. It is NOT a prerequisite for readable data: query_cube_observations fetches the structure itself and resolves labels on its own. Note that this result reports only whether a dimension has a code list (has_codelist), not the list's entries — so calling it first does not help you decode raw codes either.

Args: cube_uri: A cube URI from search_cubes. language: Language for dimension names and description.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
cube_uriYes
languageNode

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
nameNo
sourceNoData: LINDAS Linked Data Service, Swiss Federal Archives — https://lindas.admin.ch. Each cube declares its own licence; check the `licence` field before reuse.
statusNo
licenceNoOften a Fedlex URI — joins to fedlex-mcp.
versionNo
cube_uriYes
dimensionsYes
provenanceNolive_sparql
descriptionNo
creator_nameNo
retrieved_atYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.2.0

TDQS

A4.6/5.0
Behavior4/5

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

Annotations already declare readOnlyHint, idempotentHint, and non-destructive behavior. The description adds meaningful behavioral context beyond that: it returns only whether a dimension has a code list, not the entries, and warns that calling it first does not help decode raw codes. This is useful and does not contradict the annotations.

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?

The description is clearly structured: summary, return contents, usage guidance, caveat, and args. It is slightly repetitive ('what the cube contains' / 'Tells you which...'), but every section adds necessary information and the key functional caveat is highlighted.

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?

The description is complete for this tool's complexity. It covers what the tool returns, when it is useful, when it is not needed, and important limitations like has_codelist not containing entries. The output schema handles return-format details, and annotations cover the read-only safety profile, so nothing critical is missing.

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 description coverage is 0%, so the description must compensate. It does: cube_uri is explained as 'A cube URI from search_cubes', and language is explained as 'Language for dimension names and description.' This adds real meaning beyond the raw schema field names, though it leaves enum values and defaults to the schema.

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 opens with a specific verb and resource: 'Read a cube's dimensions and measures'. It then details what is returned (KeyDimension, MeasureDimension, code lists, licence), which clearly distinguishes it from siblings like query_cube_observations and run_sparql.

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 explicitly states when to call this tool: 'Call this to understand a cube before reading it, and to write a run_sparql query against it.' It also explicitly names the alternative and exclusion: query_cube_observations fetches the structure itself)Skip; and it says the tool does not help decode raw codes.

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