Skip to main content
Glama

openaq-mcp-server: dataframe query

openaq_dataframe_query
Read-only

Run a read-only SQL SELECT against the measurement tables openaq_get_measurements staged on a DataCanvas. Reference tables by the name the measurements call returned (measurements_). For aggregation (monthly means, exceedance counts) and cross-sensor comparison over series too large to inline. Only SELECT is allowed — writes, DDL, and file/network table functions are rejected.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
sqlYesRead-only SELECT. Reference tables by the names openaq_get_measurements returned (e.g. measurements_1701). Use openaq_dataframe_describe first to see table and column names.
canvas_idYesDataCanvas id returned by openaq_get_measurements when a series spilled.

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
rowsNoResult rows (capped at the canvas row limit).
errorNoPresent when the call failed. Absent on success.
rowCountNoFull result count before the row cap.

TDQS

A4.3/5.0
Behavior4/5

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

Annotations declare readOnlyHint=true, and the description reinforces this with 'read-only SQL SELECT' and adds specifics about rejected operations ('writes, DDL, and file/network table functions'). This expands beyond the annotation, clarifying constraints and expectations.

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 (three sentences), front-loads the main action ('Run a read-only SQL SELECT'), and efficiently covers table references, typical use cases, and restrictions without redundancy.

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?

With an output schema present and full schema parameter coverage, the description supplies all essential context: allowed SQL subset, how to reference tables, and when to use the tool. No critical information is missing for correct invocation.

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%, and both parameters (sql, canvas_id) already have detailed descriptions in the schema, including table naming and the recommendation to use describe first. The tool description reiterates this but does not add novel parameter-level meaning beyond the schema.

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 ('Run a read-only SQL SELECT') and resource ('measurement tables staged on a DataCanvas'), and distinguishes itself from siblings by focusing on querying staged measurement data. It clearly differentiates from retrieval tools like openaq_get_measurements and openaq_dataframe_describe.

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 provides explicit usage context: for aggregation (monthly means, exceedance counts) and cross-sensor comparison over large series. It also recommends running openaq_dataframe_describe first to inspect table/column names. It doesn't explicitly state when not to use it, but the purpose makes that inferable.

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.

TDQS

A4.4/5.0
Disambiguation5/5

Each tool serves a distinct purpose: catalog discovery (list_countries, list_parameters), station lookup (find_locations), current data (get_readings), historical data (get_measurements), and DataCanvas query support (dataframe_describe, dataframe_query). No two tools overlap in function.

Naming Consistency4/5

The prefix 'openaq_' is consistent, and most tools follow a verb_noun pattern (find_locations, get_measurements, list_countries). However, 'dataframe_describe' and 'dataframe_query' invert this to noun_verb, a minor deviation that could confuse agents.

Tool Count5/5

Seven tools covers the full workflow (discover, locate, read current/historical, and handle large data) without redundancy. This is a well-scoped surface for an air quality data server.

Completeness5/5

The set provides end-to-end capability: metadata discovery, location search, current conditions, historical time series, and a mechanism for large SQL queries. No critical gaps like missing update/delete operations exist because the server is read-only by design.