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); 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; for more than one call returns, aggregate in SQL or page with ORDER BY … LIMIT … OFFSET. Default 100; a larger value returns at most 1,000 and says so.
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, and at most 1,000 per call. 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; 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. Changed5 schema fields changed
    • changedInput schema / properties / limit / description
      Previous value: -"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."New value: +"Most rows to return; for more than one call returns, aggregate in SQL or page with ORDER BY … LIMIT … OFFSET. Default 100; a larger value returns at most 1,000 and says so."
    • removedInput schema / properties / limit / maximum
      Removed value: -10000
    • 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. `query_timeout`: The query was still running after 30 seconds and was stopped. 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, a value out of range, or an integer division or modulo by zero. `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 / rows / description
      Previous 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."New value: +"Result rows in query order: at most limit rows, and at most 1,000 per call. When truncated is true the result has more rows than these."
    • changedOutput schema / properties / truncated / description
      Previous value: -"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."New value: +"True when the result has more rows than this call returned — cut at limit; the notice says how to reach the rest. Omitted (never false) when rows is the complete result."
  2. 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"
      +}
  3. 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."
  4. 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."
  5. 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"
      +]
  6. First observed

TDQS

A4.6/5.0
Behavior5/5

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

Annotations only declare readOnly/idempotent/closed-world; the description independently discloses the row cap (default 100, hard max 1,000), the `truncated: true` signal and its notice explaining how to reach remaining rows, and a 30-second query timeout. Those are operational traits an agent cannot infer from the structured fields.

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?

Five sentences in a deliberate order: purpose, prerequisite, use cases, result/limit semantics, availability. No filler wording and the core action is front-loaded in the opening clause.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness4/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Output schema exists so return shape needn't be explained, and truncation, paging, timeout, and availability are all covered for a query tool. Minor gap: nothing on write-rejection consequences or error behavior beyond the schema's note that DDL/DML are rejected.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 100%, so the schema already explains `sql`, `limit`, and `canvas_id` including the 10-character pattern. The description restates the limit default/max and the canvas provenance, adding behavioral context but little parameter meaning beyond the schema, so baseline 3 applies.

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?

Specific verb+resource: "Run a read-only SQL SELECT against OECD observation tables staged on a DataCanvas". It names the two sibling tools that make it work (oecd_query_dataset stages the canvas, oecd_dataframe_describe supplies names), so an agent can place it in the workflow without opening another schema.

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?

Explicit prerequisite ordering ("Call oecd_dataframe_describe first") plus an enumerated set of intended workloads (aggregation, filtering, GROUP BY, JOIN, window functions). It also states an exclusion condition: unavailable when the server runs with DataCanvas disabled.

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.