Skip to main content
Glama

Query workspace data

submit_query
Read-onlyIdempotent

Run a SQL query against the Iceberg tables loaded into a workspace. To list the tables that actually exist in the workspace, run SHOW TABLES — this is the authoritative source (unlike list_data's specs, which describe pipelines, not live tables). Qualified table references (catalog/schema prefixes, e.g. information_schema.tables) are rejected; reference tables by name only. Table functions that introspect the engine itself (e.g. duckdb_functions(), duckdb_tables()) are also rejected as external-data-source access — don't try to discover available SQL functions this way. A BLOB column is very likely an HLL sketch (produced by a merge-mode table-source spec's approximate-distinct aggregate — see onboard_data_source's merge option): decode it with datasketch_hll_estimate(col), or datasketch_hll_estimate(datasketch_hll_union(12, col)) to union several rows to a coarser grain first. If the user's goal is an HTML page/dashboard built from these results (not just seeing the data here), do NOT default to embedding this result set as a static snapshot. Ask the user first: (a) a one-time static page with these results baked in, which goes stale and never changes again, or (b) a live page that logs in and queries DPF itself whenever it's opened, so it always reflects current data. If they want live/dynamic (or don't say and the data looks like it changes over time), read the dpf://examples/auth-and-query.html resource and adapt that pattern (login form, JWT cookie, fetch-based query call) instead of hand-rolling auth.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
sqlYesSQL query, e.g. SELECT * FROM customers LIMIT 10
workspaceIdNoWorkspace to act on. Defaults to your only workspace if you have exactly one.

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
rowsYes
schemaYesColumn name -> DuckDB type
rowCountNo
executionTimeMsNo

TDQS

A4.6/5.0
Behavior5/5

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

Beyond the annotations (readOnlyHint, idempotentHint, etc.), the description discloses significant behavioral traits: rejection of qualified table references, rejection of engine-introspection functions, the fact that BLOB columns are very likely HLL sketches, and the specific decoding functions. It also clarifies that results should not be embedded as static snapshots without user consultation. This adds substantial context beyond the annotations.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is long but information-dense. The first sentence is concise and clear, but subsequent paragraphs contain essential caveats and branching logic. While every sentence earns its place, the length is substantial; however, given the complexity of the tool (query execution, HLL sketches, dashboard context), it is appropriately structured and not padded.

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?

Despite having an output schema, the description still adds critical context: it explains rejection rules, HLL sketch handling, and the decision process for static vs. live dashboards. It covers edge cases and clarifies what to do when results are for a dashboard, making it complete for a complex query tool. The presence of an output schema does not substitute for these behavioral and contextual details.

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?

The schema already covers 100% of the parameters with descriptions (sql and workspaceId). The description does not add new meaning to the parameters themselves, aside from providing example SQL syntax in the schema description. The behavioral guidance about what sql can contain is more about tool behavior than parameter semantics, so no significant extra value is added 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 clearly states the tool's function: 'Run a SQL query against the Iceberg tables loaded into a workspace.' It uses a specific verb (Run) and resource (SQL query on workspace tables), and distinguishes itself from sibling list_data by noting that SHOW TABLES is authoritative for live tables, not list_data. This provides clear differentiation from related tools.

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 usage context is provided: it advises using SHOW TABLES to discover tables, warns against qualified references and engine-introspection functions, and explains when to ask users about static vs. live HTML pages. It also mentions an alternative (list_data) and instructs to read a resource for live dashboards, giving clear when-to-use and when-not-to-use guidance.

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.2/5.0
Disambiguation4/5

Most tools map to distinct lifecycle phases and the descriptions explicitly separate overlapping-sounding concepts, such as list_data versus submit_query and the generic call_dpf_api from dedicated tools. The three finish_* tools are similarly worded but each is clearly tied to a specific preceding operation, so confusion should be limited.

Naming Consistency4/5

The tool names are uniformly snake_case and mostly follow a readable verb_noun pattern like delete_data_spec, create_workspace, and run_data_job. It is not a perfect 5 because broader names like manage_connection and manage_trigger, the generic call_dpf_api, and list_my_workspaces with its pronoun make the naming pattern less predictable.

Tool Count4/5

At 16 tools, the set is just slightly above the ideal range, but the tools generally earn their place by representing distinct steps or workflow boundaries. The start/finish pairs create some apparent redundancy, but that is a natural consequence of the multi-step file-upload flow.

Completeness4/5

The toolset provides solid coverage of the core data-platform lifecycle: workspaces, data specs, jobs, connections, triggers, scheduled pulls, status polling, and SQL querying. Some additional DPF capabilities are only reachable through the generic call_dpf_api rather than dedicated tools, and billing mutations are explicitly left outside the MCP surface, so coverage is strong but not absolute.

Resources