Skip to main content
Glama

Oecd Dataframe Query

oecd_dataframe_query
Read-onlyIdempotent

Run a read-only SQL SELECT against OECD observation tables staged on a DataCanvas by oecd_query_dataset. Call oecd_dataframe_describe first to discover exact table and column names, then use this tool for aggregation, filtering, GROUP BY, JOIN, and window functions. Returns up to limit rows (default 100, at most 1,000 per call) and at most 1 MiB of row data; truncated: true marks a result with more rows than came back, and its notice says how to reach the rest. A query still running after 30 seconds is stopped. Unavailable when the server runs with DataCanvas disabled.

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": "oecd_dataframe_query"
  }
}

Input Schema

NameRequiredDescriptionDefault
sqlYesRead-only SELECT statement. Reference tables by the names returned by oecd_dataframe_describe. Only SELECT statements are allowed — DDL, DML, and file-reading functions are rejected.
limitNoMost rows to return. Default 100; served up to 1,000 per call, so a value from 1,001 to 10,000 returns at most 1,000 rows and a notice saying so. Fewer come back when the rows would pass 1 MiB of row data. For more rows than one call returns, aggregate in SQL or page with ORDER BY … LIMIT … OFFSET.
canvas_idYesCanvas ID returned by oecd_query_dataset — exactly 10 characters of letters, digits, hyphens, and underscores. Identifies the DataCanvas session holding the observation tables.

Output Schema

NameRequiredDescriptionDefault
rowsNoResult rows in query order: at most limit rows (1,000 per call) and at most 1 MiB of row data. When truncated is true the result has more rows than these.
errorNoPresent when the call failed. Absent on success.
noticeNoPresent when a requested limit was above the per-call maximum (naming the limit requested and the one served), or when truncated is true (naming the ways to reach the rows not returned).
row_countNoNumber of rows returned — the length of rows, never the size of the full result.
truncatedNoTrue when the result has more rows than this call returned — cut at limit or at the 1 MiB row-data budget; the notice says how to reach the rest. Omitted (never false) when rows is the complete result.
column_namesNoColumn names in the result, in order.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed7 schema fields changed
    • addedInput schema / properties / limit
      Added value: +{
      +  "default": 100,
      +  "description": "Most rows to return. Default 100; served up to 1,000 per call, so a value from 1,001 to 10,000 returns at most 1,000 rows and a notice saying so. Fewer come back when the rows would pass 1 MiB of row data. For more rows than one call returns, aggregate in SQL or page with ORDER BY … LIMIT … OFFSET.",
      +  "maximum": 10000,
      +  "minimum": 1,
      +  "type": "integer"
      +}
    • changedOutput schema / properties / error / properties / data / properties / reason / description
      Previous value: -"Machine-readable failure mode. Declared by this tool: `canvas_disabled`: DataCanvas is not configured — CANVAS_PROVIDER_TYPE=none. `canvas_not_found`: The canvas_id has expired or was never created. `table_not_found`: The SQL names a table this canvas does not hold — it expired, was dropped, or the name is wrong. `invalid_sql`: The SQL is not a valid SELECT statement or contains disallowed operations. `sql_execution_error`: The SQL parsed and ran, then failed on the staged observation data — a conversion, an invalid input, or a value out of range. Other values are possible when a failure originates below the handler."New value: +"Machine-readable failure mode. Declared by this tool: `canvas_disabled`: DataCanvas is not configured — CANVAS_PROVIDER_TYPE=none. `canvas_not_found`: The canvas_id has expired or was never created. `table_not_found`: The SQL names a table this canvas does not hold — it expired, was dropped, or the name is wrong. `invalid_sql`: The SQL is not a valid SELECT statement or contains disallowed operations. `sql_execution_error`: The SQL parsed and ran, then failed on the staged observation data — a conversion, an invalid input, or a value out of range. `query_timeout`: The query was still running after 30 seconds and was stopped. Other values are possible when a failure originates below the handler."
    • changedOutput schema / properties / error / properties / data / properties / reason / examples
      Previous value: -[
      -  "canvas_disabled",
      -  "canvas_not_found",
      -  "table_not_found",
      -  "invalid_sql",
      -  "sql_execution_error"
      -]New value: +[
      +  "canvas_disabled",
      +  "canvas_not_found",
      +  "table_not_found",
      +  "invalid_sql",
      +  "sql_execution_error",
      +  "query_timeout"
      +]
    • addedOutput schema / properties / notice
      Added value: +{
      +  "description": "Present when a requested limit was above the per-call maximum (naming the limit requested and the one served), or when truncated is true (naming the ways to reach the rows not returned).",
      +  "type": "string"
      +}
    • changedOutput schema / properties / row_count / description
      Previous value: -"Number of rows returned, after the canvas row cap."New value: +"Number of rows returned — the length of rows, never the size of the full result."
    • changedOutput schema / properties / rows / description
      Previous value: -"Result rows from the SQL query (capped at the canvas row limit)."New value: +"Result rows in query order: at most limit rows (1,000 per call) and at most 1 MiB of row data. When truncated is true the result has more rows than these."
    • addedOutput schema / properties / truncated
      Added value: +{
      +  "description": "True when the result has more rows than this call returned — cut at limit or at the 1 MiB row-data budget; the notice says how to reach the rest. Omitted (never false) when rows is the complete result.",
      +  "type": "boolean"
      +}
  2. Changed1 schema field changed
    • changedOutput schema / properties / row_count / description
      Previous value: -"Full result count before any row cap."New value: +"Number of rows returned, after the canvas row cap."
  3. Changed1 schema field changed
    • changedOutput schema / properties / error / properties / data / properties / reason / description
      Previous value: -"Machine-readable failure mode. Declared by this tool: `canvas_disabled`: DataCanvas is not configured — CANVAS_PROVIDER_TYPE is unset. `canvas_not_found`: The canvas_id has expired or was never created. `table_not_found`: The SQL names a table this canvas does not hold — it expired, was dropped, or the name is wrong. `invalid_sql`: The SQL is not a valid SELECT statement or contains disallowed operations. `sql_execution_error`: The SQL parsed and ran, then failed on the staged observation data — a conversion, an invalid input, or a value out of range. Other values are possible when a failure originates below the handler."New value: +"Machine-readable failure mode. Declared by this tool: `canvas_disabled`: DataCanvas is not configured — CANVAS_PROVIDER_TYPE=none. `canvas_not_found`: The canvas_id has expired or was never created. `table_not_found`: The SQL names a table this canvas does not hold — it expired, was dropped, or the name is wrong. `invalid_sql`: The SQL is not a valid SELECT statement or contains disallowed operations. `sql_execution_error`: The SQL parsed and ran, then failed on the staged observation data — a conversion, an invalid input, or a value out of range. Other values are possible when a failure originates below the handler."
  4. Changed4 schema fields changed
    • changedInput schema / properties / canvas_id / description
      Previous value: -"Canvas ID returned by oecd_query_dataset. Identifies the DataCanvas session holding the observation tables."New value: +"Canvas ID returned by oecd_query_dataset — exactly 10 characters of letters, digits, hyphens, and underscores. Identifies the DataCanvas session holding the observation tables."
    • addedInput schema / properties / canvas_id / pattern
      Added value: +"^[A-Za-z0-9_-]{10}$"
    • changedOutput schema / properties / error / properties / data / properties / reason / description
      Previous value: -"Machine-readable failure mode. Declared by this tool: `canvas_disabled`: DataCanvas is not configured — CANVAS_PROVIDER_TYPE is unset. `canvas_not_found`: The canvas_id has expired or was never created. `table_not_found`: The SQL names a table this canvas does not hold — it expired, was dropped, or the name is wrong. `invalid_sql`: The SQL is not a valid SELECT statement or contains disallowed operations. Other values are possible when a failure originates below the handler."New value: +"Machine-readable failure mode. Declared by this tool: `canvas_disabled`: DataCanvas is not configured — CANVAS_PROVIDER_TYPE is unset. `canvas_not_found`: The canvas_id has expired or was never created. `table_not_found`: The SQL names a table this canvas does not hold — it expired, was dropped, or the name is wrong. `invalid_sql`: The SQL is not a valid SELECT statement or contains disallowed operations. `sql_execution_error`: The SQL parsed and ran, then failed on the staged observation data — a conversion, an invalid input, or a value out of range. Other values are possible when a failure originates below the handler."
    • changedOutput schema / properties / error / properties / data / properties / reason / examples
      Previous value: -[
      -  "canvas_disabled",
      -  "canvas_not_found",
      -  "table_not_found",
      -  "invalid_sql"
      -]New value: +[
      +  "canvas_disabled",
      +  "canvas_not_found",
      +  "table_not_found",
      +  "invalid_sql",
      +  "sql_execution_error"
      +]
  5. First observed

TDQS

A4.9/5.0
Behavior5/5

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

Beyond the read-only and idempotent annotations, it discloses the default and per-call row limits, 1 MiB data cap, truncation indicator, 30-second query timeout, and DataCanvas availability dependency. These details give the agent a clear picture of execution constraints and partial-result behavior.

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 compact and front-loaded with the operation, prerequisite, and intended uses. Subsequent sentences efficiently cover result limits, truncation, timeout, and availability without filler.

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 this three-parameter query tool, the description supplies the workflow prerequisites, operational scope, execution restrictions, and result-limiting behavior needed for correct invocation. The output schema handles return structure, so no additional return-value documentation is necessary.

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 already 100%, so the baseline is 3, but the description adds useful SQL-authoring context by naming supported analytical operations and clarifying the relationship between the SQL and staged tables. Much of the limit information repeats the schema, preventing a higher score.

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 precisely identifies the operation and resource: running a read-only SQL SELECT over OECD observation tables staged on a DataCanvas. It distinguishes this tool from oecd_dataframe_describe and oecd_query_dataset by placing it within their workflow.

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?

It explicitly directs the agent to call oecd_dataframe_describe first for exact table and column names and identifies suitable SQL tasks such as aggregation, filtering, JOIN, and window functions. It also states the availability precondition and explains how truncation notices guide access to further results.

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.