Skip to main content
Glama

Query Eurostat Dataframes

eurostat_dataframe_query
Read-onlyIdempotent

Run one read-only SQL SELECT against the tables staged on a Eurostat dataframe canvas, to reach observations past an inline preview and to aggregate or join them without re-fetching. Call eurostat_dataframe_describe first for the table and column names. Statement chaining, other verbs, and functions that read files or external data are rejected. Returns every complete row up to the canvas row limit.

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": {
      "canvas_id": "<canvas_id>",
      "sql": "<sql>"
    },
    "name": "eurostat_dataframe_query"
  }
}

Input Schema

NameRequiredDescriptionDefault
sqlYesOne read-only SELECT over the names eurostat_dataframe_describe reports, e.g. SELECT geo, AVG(obs_value) AS mean FROM df_a1b2c3d4 WHERE time >= '2020' GROUP BY geo ORDER BY mean DESC.
canvas_idYesThe canvasId a eurostat_query_dataset, eurostat_download_dataset or eurostat_get_dimension_values response returned.

Output Schema

NameRequiredDescriptionDefault
rowsNoComplete rows keyed by column name, nested cells as JSON. 64-bit integers arrive as strings; cast to DOUBLE in SQL for a number.
errorNoPresent when the call failed. Absent on success.
noticeNoRow-limit cut disclosure with SQL paging guidance.
columnsNoColumn names in projection order.
canvasIdNoCanvas the query ran against.
rowCountNoComplete rows returned.
truncatedNoTrue when the canvas row limit cut rows: page the same deterministic SELECT over unchanged tables with a total ORDER BY (tie-breakers for tied keys) and LIMIT/OFFSET, advancing OFFSET by rowCount; an unordered first page restarts sorted at OFFSET 0.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed8 schema fields changed
    • changedInput schema / properties / canvas_id / description
      Previous value: -"Canvas identifier returned as canvasId by eurostat_query_dataset, eurostat_download_dataset, or eurostat_get_dimension_values. Identifies the workspace holding the staged tables."New value: +"The canvasId a eurostat_query_dataset, eurostat_download_dataset or eurostat_get_dimension_values response returned."
    • changedInput schema / properties / sql / description
      Previous value: -"A single read-only SELECT statement. Reference tables by the names eurostat_dataframe_describe reports. Example: SELECT geo, geo_label, AVG(obs_value) AS mean FROM df_a1b2c3d4 WHERE time >= '2020' GROUP BY geo, geo_label ORDER BY mean DESC."New value: +"One read-only SELECT over the names eurostat_dataframe_describe reports, e.g. SELECT geo, AVG(obs_value) AS mean FROM df_a1b2c3d4 WHERE time >= '2020' GROUP BY geo ORDER BY mean DESC."
    • changedOutput schema / properties / canvasId / description
      Previous value: -"Canvas identifier the query ran against."New value: +"Canvas the query ran against."
    • changedOutput schema / properties / error / properties / data / properties / reason / description
      Previous value: -"Machine-readable failure mode. Declared by this tool: `canvas_disabled`: This deployment runs without a dataframe canvas, so there is nothing to query. `canvas_not_found`: The canvas_id is unknown or its lifetime has elapsed. `missing_table`: The SQL names a table that is not staged on this canvas, or that has expired. Other values are possible when a failure originates below the handler."New value: +"Machine-readable failure mode. Declared by this tool: `canvas_disabled`: This deployment runs without a dataframe canvas. `canvas_not_found`: The canvas_id is unknown or expired. `missing_table`: The SQL names a table not staged on this canvas, or expired. Other values are possible when a failure originates below the handler."
    • changedOutput schema / properties / notice / description
      Previous value: -"Whole-row cut disclosure and deterministic SQL paging guidance. Omitted when no rows were omitted."New value: +"Row-limit cut disclosure with SQL paging guidance."
    • changedOutput schema / properties / rowCount / description
      Previous value: -"Complete rows returned after the canvas row limit. Advance SQL OFFSET by this actual count."New value: +"Complete rows returned."
    • changedOutput schema / properties / rows / description
      Previous value: -"Complete result rows, keyed by column name, bounded by the canvas row limit. Nested cells render as JSON; 64-bit integers arrive as strings so they survive intact. Cast to DOUBLE in SQL if a number is wanted."New value: +"Complete rows keyed by column name, nested cells as JSON. 64-bit integers arrive as strings; cast to DOUBLE in SQL for a number."
    • changedOutput schema / properties / truncated / description
      Previous value: -"True when the canvas row limit omitted rows. Follow notice for SQL paging."New value: +"True when the canvas row limit cut rows: page the same deterministic SELECT over unchanged tables with a total ORDER BY (tie-breakers for tied keys) and LIMIT/OFFSET, advancing OFFSET by rowCount; an unordered first page restarts sorted at OFFSET 0."
  2. Changed3 schema fields changed
    • changedOutput schema / properties / rowCount / description
      Previous value: -"Complete rows returned after the canvas row limit and the 64,000-byte budget per serialized response surface. Advance SQL OFFSET by this actual count."New value: +"Complete rows returned after the canvas row limit. Advance SQL OFFSET by this actual count."
    • changedOutput schema / properties / rows / description
      Previous value: -"Complete result rows, keyed by column name, bounded by the canvas row limit and 64,000 bytes per serialized surface. Nested cells render as JSON; 64-bit integers arrive as strings so they survive intact. Cast to DOUBLE in SQL if a number is wanted."New value: +"Complete result rows, keyed by column name, bounded by the canvas row limit. Nested cells render as JSON; 64-bit integers arrive as strings so they survive intact. Cast to DOUBLE in SQL if a number is wanted."
    • changedOutput schema / properties / truncated / description
      Previous value: -"True when the canvas row limit or the 64,000-byte budget per serialized response surface omitted rows. At least one complete row is retained even if oversized. Follow notice for SQL paging."New value: +"True when the canvas row limit omitted rows. Follow notice for SQL paging."
  3. Changed4 schema fields changed
    • addedOutput schema / properties / notice
      Added value: +{
      +  "description": "Whole-row cut disclosure and deterministic SQL paging guidance. Omitted when no rows were omitted.",
      +  "type": "string"
      +}
    • changedOutput schema / properties / rowCount / description
      Previous value: -"Rows materialized into this response. Equals the full result size unless truncated is true."New value: +"Complete rows returned after the canvas row limit and the 64,000-byte budget per serialized response surface. Advance SQL OFFSET by this actual count."
    • changedOutput schema / properties / rows / description
      Previous value: -"Result rows, each keyed by column name. Bounded by the canvas row limit. 64-bit integer results — COUNT(*) among them — arrive as strings so values outside the JSON number range survive intact; cast to DOUBLE in the SQL if a number is wanted."New value: +"Complete result rows, keyed by column name, bounded by the canvas row limit and 64,000 bytes per serialized surface. Nested cells render as JSON; 64-bit integers arrive as strings so they survive intact. Cast to DOUBLE in SQL if a number is wanted."
    • changedOutput schema / properties / truncated / description
      Previous value: -"True when the result exceeded the canvas row limit and was cut short. Add a LIMIT, an aggregate, or a narrower WHERE clause to see the rest."New value: +"True when the canvas row limit or the 64,000-byte budget per serialized response surface omitted rows. At least one complete row is retained even if oversized. Follow notice for SQL paging."
  4. Changed1 schema field changed
    • changedInput schema / properties / canvas_id / description
      Previous value: -"Canvas identifier returned as canvasId by eurostat_query_dataset or eurostat_download_dataset. Identifies the workspace holding the staged tables."New value: +"Canvas identifier returned as canvasId by eurostat_query_dataset, eurostat_download_dataset, or eurostat_get_dimension_values. Identifies the workspace holding the staged tables."
  5. Changed2 schema fields changed
    • removedInput schema / properties / canvas_id / minLength
      Removed value: -1
    • addedInput schema / properties / canvas_id / pattern
      Added value: +"^[A-Za-z0-9_-]{10}$"
  6. Changed6 schema fields changed
    • changedInput schema / $schema
      Previous value: -"http://json-schema.org/draft-07/schema#"New value: +"https://json-schema.org/draft/2020-12/schema"
    • addedInput schema / additionalProperties
      Added value: +false
    • changedOutput schema / $schema
      Previous value: -"http://json-schema.org/draft-07/schema#"New value: +"https://json-schema.org/draft/2020-12/schema"
    • addedOutput schema / anyOf
      Added value: +[
      +  {
      +    "not": {
      +      "required": [
      +        "error"
      +      ]
      +    },
      +    "required": [
      +      "canvasId",
      +      "columns",
      +      "rows",
      +      "rowCount",
      +      "truncated"
      +    ]
      +  },
      +  {
      +    "required": [
      +      "error"
      +    ]
      +  }
      +]
    • addedOutput schema / properties / error
      Added value: +{
      +  "additionalProperties": {},
      +  "description": "Present when the call failed. Absent on success.",
      +  "properties": {
      +    "code": {
      +      "description": "JSON-RPC error code for this failure.",
      +      "maximum": 9007199254740991,
      +      "minimum": -9007199254740991,
      +      "type": "integer"
      +    },
      +    "data": {
      +      "additionalProperties": {},
      +      "properties": {
      +        "reason": {
      +          "description": "Machine-readable failure mode. Declared by this tool: `canvas_disabled`: This deployment runs without a dataframe canvas, so there is nothing to query. `canvas_not_found`: The canvas_id is unknown or its lifetime has elapsed. `missing_table`: The SQL names a table that is not staged on this canvas, or that has expired. Other values are possible when a failure originates below the handler.",
      +          "examples": [
      +            "canvas_disabled",
      +            "canvas_not_found",
      +            "missing_table"
      +          ],
      +          "type": "string"
      +        },
      +        "recovery": {
      +          "additionalProperties": {},
      +          "description": "Actionable next step for the caller.",
      +          "properties": {
      +            "hint": {
      +              "type": "string"
      +            }
      +          },
      +          "required": [
      +            "hint"
      +          ],
      +          "type": "object"
      +        },
      +        "retryable": {
      +          "description": "Whether retrying may succeed.",
      +          "type": "boolean"
      +        }
      +      },
      +      "type": "object"
      +    },
      +    "message": {
      +      "description": "Human-readable description of what went wrong.",
      +      "type": "string"
      +    }
      +  },
      +  "required": [
      +    "code",
      +    "message"
      +  ],
      +  "type": "object"
      +}
    • removedOutput schema / required
      Removed value: -[
      -  "canvasId",
      -  "columns",
      -  "rows",
      -  "rowCount",
      -  "truncated"
      -]
  7. Changed1 schema field changed
    • changedInput schema / properties / canvas_id / description
      Previous value: -"Canvas identifier returned by eurostat_query_dataset as canvasId. Identifies the workspace holding the staged tables."New value: +"Canvas identifier returned as canvasId by eurostat_query_dataset or eurostat_download_dataset. Identifies the workspace holding the staged tables."
  8. Added

TDQS

A4.5/5.0
Behavior4/5

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

Beyond the readOnly/idempotent/closed-world annotations, the description discloses a real behavioral boundary: statement chaining, non-SELECT verbs, and file- or external-reading functions are rejected. It also states the result contract, "every complete row up to the canvas row limit", which the annotations do not convey.

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?

Four sentences, each carrying distinct load: purpose, prerequisite, rejection rules, return scope. The blocking context (read-only SELECT on staged canvas tables) is front-loaded before the constraints.

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?

An output schema exists, yet the description still summarizes the return scope (complete rows up to the canvas row limit), and it covers the rejection rules an agent would otherwise only learn by failing. Nothing needed to invoke this two-parameter query tool 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?

Schema coverage is 100%, so both parameters are already documented, making 3 the baseline. The description still adds framing not in the schema: the tables are staged on a canvas, the identifiers come from a named sibling's output, and the SQL must be a single read-only SELECT over the reported names.

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 and resource ("Run one read-only SQL SELECT against the tables staged on a Eurostat dataframe canvas") and scopes it against the inline preview it exists to bypass. It also names the sibling eurostat_dataframe_describe as the prerequisite for table and column discovery, so an agent can place it precisely in the workflow.

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 clear triggering conditions — reach observations past an inline preview, aggregate or join without re-fetching — plus an explicit ordering rule to call eurostat_dataframe_describe first. It stops short of naming which alternative to use when no canvas is staged (e.g. eurostat_query_dataset), leaving that routing implicit.

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.