Skip to main content
Glama

Query Parquet with SQL

query_parquet
Read-onlyIdempotent

Run one read-only DuckDB SELECT over a Parquet file, available as table data; join more files by passing tables ({name: artifact_id}, up to 7 besides data), e.g. a GL against a bank statement. Supports aggregates, window functions, CTEs, DESCRIBE data and SUMMARIZE data. Up to 1000 rows are returned; truncated says if more matched. Writes, file access and multiple statements are rejected. Example: SELECT region, sum(units) FROM data GROUP BY 1 ORDER BY 2 DESC. Price: $0.005 USDC per successful call, paid via x402.

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": {
      "sql": "<sql>"
    },
    "name": "query_parquet"
  }
}

Input Schema

NameRequiredDescriptionDefault
sqlYesOne DuckDB SELECT statement over table `data`.
urlNoPublic http(s) URL of the input file. Preferred for anything over ~3 MB.
limitNoMaximum rows to return.
formatNojson rows (default), a Markdown table, or CSV text.json
tablesNoExtra tables for joins: {name: artifact_id}, up to 7 besides data. The main input is `data`.
artifact_idNoartifact_id returned by an earlier convert_to_parquet call.

Output Schema

NameRequiredDescriptionDefault
rowsNoPresent when format=json.
textNoPresent when format=markdown or csv.
typesYes
columnsYes
row_countYes
truncatedYesTrue when more rows matched than were returned.
total_rowsNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A3.8/5.0
Behavior4/5

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

Annotations already declare read-only, idempotent, non-destructive, so the safety profile is covered; the description still adds substantial beyond-schema behavior: the hard 1000-row return cap, the `truncated` indicator for incomplete results, the rejection of writes and multiple statements, and the x402 pricing of $0.005 USDC per successful call. That pricing and truncation detail is exactly the kind of operational context annotations cannot carry, though the response shape itself is left to the output schema.

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 purpose and the `data` table binding are front-loaded, and every clause carries information (cap, truncation, rejections, price, example). It is dense to the point of being semicolon-chained, and the trailing price sentence could sit earlier, but no sentence is wasted.

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?

For a six-parameter query tool with a full schema, rich annotations, and an output schema, the description covers the query model, join mechanics, row limits, failure modes, and cost. The only real gap is sibling positioning against preview/inspect, which would help an agent pick the right entry point.

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?

With 100% schema description coverage the baseline is 3, and the description earns an increment by explaining the relational model: the primary input is exposed as table `data`, and `tables` supplies at most 7 additional named artifacts to join against. That join semantics and the table-name binding are not visible from the schema alone, making the description materially useful for constructing correct SQL.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

The definition names a specific verb and resource combination ('Run one read-only DuckDB SELECT over a Parquet file, available as table `data`') and scopes it further with supported SQL features and a 1000-row cap. An agent can tell this is the analytical query tool rather than the conversion tool, but the description never contrasts itself with the sibling inspection/preview tools, so the differentiation is implied rather than stated.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines3/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

It provides a concrete motivating scenario ('e.g. a GL against a bank statement') and states what is rejected (writes, file access, multiple statements), which implies when the tool applies. However, it gives no explicit routing advice: nothing says when to reach for this versus `preview_parquet` or `inspect_parquet`, and no prerequisites about how `artifact_id` should be obtained beyond the schema field text.

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.