Skip to main content
Glama

Openmeteo Dataframe Query

openmeteo_dataframe_query
Read-only

Run a read-only SQL SELECT against tables staged on a DataCanvas by openmeteo_get_forecast, openmeteo_get_historical, openmeteo_get_marine, openmeteo_get_air_quality, openmeteo_get_ensemble, openmeteo_get_flood, or openmeteo_get_climate. Pass the canvas_id returned when any of those tools spills (truncated: true), and reference the exact table_name those tools return alongside it. Call openmeteo_dataframe_describe to list staged tables and their columns when you need to discover names.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
sqlYesRead-only SELECT statement. Reference table names from openmeteo_dataframe_describe. Example: SELECT AVG(temperature_2m) AS avg_temp, strftime(time, '%Y-%m') AS month FROM spilled_abc123 GROUP BY month ORDER BY month
canvas_idYesCanvas ID returned by openmeteo_get_forecast, openmeteo_get_historical, openmeteo_get_marine, openmeteo_get_air_quality, openmeteo_get_ensemble, openmeteo_get_flood, or openmeteo_get_climate when truncated: true.

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
rowsNoResult rows — a preview capped at 100. When row_count exceeds this, page the rest by re-issuing the SQL with LIMIT / OFFSET.
errorNoPresent when the call failed. Absent on success.
canvas_idNoCanvas ID that was queried.
row_countNoTotal rows in the full result before any cap.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed2 schema fields changed
    • 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_not_enabled`: CANVAS_PROVIDER_TYPE is not set to duckdb `canvas_not_found`: The canvas_id is unknown or has expired (TTL is 24 h sliding) `system_catalog_access`: The SQL references a system catalog (information_schema, sqlite_master, pg_catalog, or a duckdb_*() function) `missing_table`: The SQL references a table that is not staged on this canvas — a mistyped name, or one that expired (24 h sliding TTL) or was dropped Other values are possible when a failure originates below the handler."New value: +"Machine-readable failure mode. Declared by this tool: `canvas_not_enabled`: CANVAS_PROVIDER_TYPE is not set to duckdb. `canvas_not_found`: The canvas_id is unknown or has expired (TTL is 24 h sliding). `system_catalog_access`: The SQL references a system catalog (information_schema, sqlite_master, pg_catalog, or a duckdb_*() function). `missing_table`: The SQL references a table that is not staged on this canvas — a mistyped name, or one that expired (24 h sliding TTL) or was dropped. Other values are possible when a failure originates below the handler."
  2. 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": [
      +      "rows",
      +      "row_count",
      +      "canvas_id"
      +    ]
      +  },
      +  {
      +    "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_not_enabled`: CANVAS_PROVIDER_TYPE is not set to duckdb `canvas_not_found`: The canvas_id is unknown or has expired (TTL is 24 h sliding) `system_catalog_access`: The SQL references a system catalog (information_schema, sqlite_master, pg_catalog, or a duckdb_*() function) `missing_table`: The SQL references a table that is not staged on this canvas — a mistyped name, or one that expired (24 h sliding TTL) or was dropped Other values are possible when a failure originates below the handler.",
      +          "examples": [
      +            "canvas_not_enabled",
      +            "canvas_not_found",
      +            "system_catalog_access",
      +            "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: -[
      -  "rows",
      -  "row_count",
      -  "canvas_id"
      -]
  3. Changed1 schema field changed
    • changedInput schema / properties / canvas_id / description
      Previous value: -"Canvas ID returned by openmeteo_get_forecast, openmeteo_get_historical, openmeteo_get_ensemble, openmeteo_get_flood, or openmeteo_get_climate when truncated: true."New value: +"Canvas ID returned by openmeteo_get_forecast, openmeteo_get_historical, openmeteo_get_marine, openmeteo_get_air_quality, openmeteo_get_ensemble, openmeteo_get_flood, or openmeteo_get_climate when truncated: true."
  4. Changed1 schema field changed
    • changedInput schema / properties / canvas_id / description
      Previous value: -"Canvas ID returned by openmeteo_get_historical, openmeteo_get_ensemble, openmeteo_get_flood, or openmeteo_get_climate when truncated: true."New value: +"Canvas ID returned by openmeteo_get_forecast, openmeteo_get_historical, openmeteo_get_ensemble, openmeteo_get_flood, or openmeteo_get_climate when truncated: true."
  5. Changed1 schema field changed
    • changedInput schema / properties / canvas_id / description
      Previous value: -"Canvas ID returned by openmeteo_get_historical, openmeteo_get_ensemble, or openmeteo_get_climate when truncated: true."New value: +"Canvas ID returned by openmeteo_get_historical, openmeteo_get_ensemble, openmeteo_get_flood, or openmeteo_get_climate when truncated: true."
  6. Changed1 schema field changed
    • changedOutput schema / properties / rows / description
      Previous value: -"Result rows (capped at the canvas row limit, default 10 000)."New value: +"Result rows — a preview capped at 100. When row_count exceeds this, page the rest by re-issuing the SQL with LIMIT / OFFSET."
  7. Changed1 schema field changed
    • changedInput schema / properties / canvas_id / description
      Previous value: -"Canvas ID returned by openmeteo_get_historical or openmeteo_get_ensemble when truncated: true."New value: +"Canvas ID returned by openmeteo_get_historical, openmeteo_get_ensemble, or openmeteo_get_climate when truncated: true."
  8. Changed1 schema field changed
    • changedInput schema / properties / canvas_id / description
      Previous value: -"Canvas ID returned by openmeteo_get_historical when truncated: true."New value: +"Canvas ID returned by openmeteo_get_historical or openmeteo_get_ensemble when truncated: true."
  9. Added

TDQS

A4.5/5.0
Behavior4/5

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

Annotations already declare readOnlyHint=true, and the description reinforces this with 'read-only SQL SELECT', so there is no contradiction. The description adds meaningful context beyond the annotation by specifying that the canvas_id must come from tools that returned truncation (truncated: true), and that the table_name must match exactly. This is useful behavioral information about prerequisites and usage constraints. It doesn't cover error handling or limits, but given the read-only annotation, the description is sufficiently transparent.

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?

Three sentences, each with a distinct purpose: the first states the primary action and source of data, the second explains the two required inputs (canvas_id and table_name), and the third points to the sibling tool for discovery. Front-loaded with the core purpose, no fluff, and every sentence earns its place.

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 tool that runs SQL on staged tables, the description covers the essential workflow: where the data comes from (the listed openmeteo_get_* tools), the prerequisite (canvas_id when truncated: true), how to reference tables (exact table_name), and how to discover names (via describe). The output schema exists, so return values need not be described. Nothing critical for an agent to call this tool correctly is missing.

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 coverage is 100%, with both parameters having detailed descriptions in the schema itself. The sql parameter description includes an example query and reference to describe, and canvas_id description mentions the tools and truncation condition. The tool description largely echoes these points without adding new parameter-level semantics. The baseline of 3 applies because the schema already carries the explanatory weight; the description adds minimal extra meaning.

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 clearly states the verb and resource: 'Run a read-only SQL SELECT against tables staged on a DataCanvas'. It also names the specific tools that stage the tables, which distinguishes it from the sibling openmeteo_dataframe_describe (which lists tables) and the various openmeteo_get_* tools (which fetch data). The purpose is unambiguous and specific.

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 routes the agent to the alternative tool when needed: 'Call openmeteo_dataframe_describe to list staged tables and their columns when you need to discover names.' This clearly separates discovery (describe) from querying (this tool). It also implies the prerequisite (canvas_id from truncated spills) and the condition for using this tool. No ambiguity about when to use it versus siblings.

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.