Skip to main content
Glama

query

Execute read-only SQL queries on data files (CSV, Parquet, JSON, Excel) to explore and return results as markdown tables.

Instructions

Run a read-only DuckDB SQL statement and return the rows as a markdown table.

Only a single SELECT (including WITH/DESCRIBE/SUMMARIZE/SHOW) or EXPLAIN statement is accepted; anything that writes data, files or settings is rejected. Read files by quoting their path in the FROM clause, e.g. SELECT region, sum(amount) FROM 'data/sales.parquet' GROUP BY 1.

Args: sql: The statement to run. max_rows: Row cap for this call (defaults to the server's limit).

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
sqlYes
max_rowsNo

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
resultYes
Behavior5/5

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

With no annotations, the description carries full behavioral disclosure. It states the read-only nature, accepted and rejected statement types, the markdown output format, and the max_rows default. This goes beyond minimal requirements and helps the agent understand important constraints and return format.

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 and front-loaded with the purpose, followed by necessary constraints and an example. It includes an Args section that cleanly maps to parameters without unnecessary verbosity.

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 two-parameter tool with no annotations, the description covers purpose, accepted/rejected inputs, output format, and parameter semantics. It also clarifies the read-only nature and file-reading capability, making it self-sufficient for an agent to use correctly.

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

Parameters5/5

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

Schema description coverage is 0%, so the description must compensate. It explains sql as 'the statement to run' and max_rows as a 'row cap' with a default to the server's limit, plus includes an example for reading files. This adds significant meaning beyond the raw 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 runs a read-only DuckDB SQL statement and returns rows as a markdown table. It specifies the verb 'Run' and resource 'DuckDB SQL statement', and distinguishes itself from file-oriented siblings (describe_file, preview_file, etc.) by focusing on arbitrary SQL execution.

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 clear context: accepted statement types (SELECT, WITH, DESCRIBE, SUMMARIZE, SHOW, EXPLAIN) and explicitly rejects writes. However, it does not mention when to prefer this tool over sibling tools or provide exclusions beyond statement type, so it lacks explicit alternative guidance.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Install Server

Other Tools

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/lab1702/duck-mcp'

If you have feedback or need assistance with the MCP directory API, please join our Discord server