Skip to main content
Glama

Query observations from a LINDAS data cube

query_data_cube
Read-only

Fetch filtered observations from a LINDAS statistical cube as flat rows with human-readable labels, using dimension filters to extract specific data subsets.

Instructions

Fetch observations from a LINDAS statistical cube as flat rows keyed by dimension labels (IRI values replaced by their human labels; numbers as numbers). Optional filters map a dimension (label, IRI or IRI local name) to one value or a list of values (label, literal such as a year, or IRI), matching is exact and case-insensitive; get valid values from describe_data_cube. Returns columns (with role and unit), rows and row_count. limit default 100, max 1000 (large results are trimmed to fit 50 KB). Examples: {cube: 'https://energy.ld.admin.ch/elcom/electricityprice', filters: {'Period': '2025', 'Category': 'H4'}, limit: 50}, {cube: '', filters: {'Canton': ['Zürich', 'Bern']}}.

Tool call template

Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {
      "cube": "<cube>"
    },
    "name": "query_data_cube"
  }
}

Input Schema

NameRequiredDescriptionDefault
cubeYesCube IRI from search_data_cubes
langNoen
limitNo
offsetNoSkip observations for paging (stable order; max 10000; use filters to reach deeper data)
filtersNo{dimension label/IRI: value label/IRI or array of them}. Max 10 filters.
include_irisNoAlso return the raw IRI of each IRI-valued cell as '<column> IRI'
include_sparqlNoReturn the generated SPARQL (to adapt with query_lindas)

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv1.0.3

TDQS

A4.6/5.0
Behavior5/5

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

Annotations only declare readOnlyHint and openWorldHint; the description adds substantial behavior beyond that: IRIs are replaced by human labels, numbers come back as numbers, matching is exact and case-insensitive, results are trimmed to fit 50 KB, and offset paging relies on a stable order capped at 10000.

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?

Dense but front-loaded: the core fetch behavior leads, filter semantics follow, and the two worked examples earn their space by showing single-value and list filters. The paragraph is packed with semicolon-separated clauses, which is slightly harder to scan than discrete sentences.

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?

For a seven-parameter tool with a nested filters object and no output schema, the description still states the return shape (columns with role and unit, rows, row_count) and covers filtering, paging, and size limits. Nothing needed to invoke it correctly 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?

Goes well beyond the schema for the highest-risk parameter, explaining that filter keys and values may be labels, IRIs, or IRI local names and that matching is exact and case-insensitive, plus limit interplay with the 50 KB trim. The lang, include_iris, and include_sparql parameters carry their meaning only from the schema, leaving a small gap.

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?

States a specific verb and resource ('Fetch observations from a LINDAS statistical cube') plus the output shape ('flat rows keyed by dimension labels'), which distinguishes it from describe_data_cube and query_lindas, both of which are named in the text.

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?

Explicitly routes the agent to describe_data_cube for valid filter values and to query_lindas when the generated SPARQL needs adapting, giving clear context for alternatives. It stops short of stating when this tool should not be used at all (e.g. for metadata-only needs), so it is not a full when/when-not treatment.

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

Deploy Server

Other Tools