Skip to main content
Glama
io.github.0xmortuex/duckdb-mcp

io.github.0xmortuex/duckdb-mcp

by 0xmortuex

query

Execute read-only SQL statements over local CSV, Parquet, and JSON files to explore and aggregate data safely within approved folders.

Instructions

Run one read-only SQL statement (DuckDB dialect) over the data files.

Reference files by name: SELECT * FROM 'sales.csv', or read_csv('sales.csv'), read_parquet('dir/*.parquet'), read_json_auto('events.ndjson'). Paths are relative to the allowed folders (see list_files) or absolute inside them. Allowed: SELECT, WITH, VALUES, FROM-first queries, DESCRIBE, SUMMARIZE, SHOW and EXPLAIN. Anything that writes or reaches outside the allowed folders (INSERT, CREATE, COPY, ATTACH, INSTALL, SET, PRAGMA, files elsewhere on disk, URLs) is rejected.

Output is a markdown table by default; format='csv' or 'json' is more compact for big results. Results stop at the server's row cap (default 1000) with a TRUNCATED notice; pass a smaller max_rows to see less. Queries have a time limit. Prefer aggregation (GROUP BY, COUNT, SUM) over fetching raw rows. Use describe_file first for column names.

Input Schema

NameRequiredDescriptionDefault
sqlYes
formatNomarkdown
max_rowsNo

Output Schema

NameRequiredDescriptionDefault
resultYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A4.5/5.0
Behavior4/5

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

With no annotations, the description carries the full behavioral burden and does it well: it enumerates rejected statement types (INSERT, CREATE, COPY, ATTACH, INSTALL, SET, PRAGMA, URLs, out-of-scope paths), discloses the server row cap default of 1000 with a TRUNCATED notice, and warns of a query time limit. Gaps remain: the time limit is unquantified and error/failure semantics (what the agent sees when a query is rejected) are not described.

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?

Front-loaded with the action, then ordered by what an agent needs next: allowed syntax, rejection rules, output/truncation behavior, and strategy advice. Sentence count is high but each one carries a distinct constraint or affordance; nothing merely restates the name or schema.

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?

An output schema exists, so return value structure needn't be spelled out, and the description still covers formatting and truncation. It is nearly complete for a query tool; the missing pieces are error/retry behavior and any note on whether the row cap can be raised.

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 and does: it explains that format='csv' or 'json' is more compact for big results, and that max_rows can be set smaller to see less against a 1000-row default cap. For the required sql parameter it supplies dialect, allowed statement forms, and file-reference syntax (read_csv, read_parquet glob, read_json_auto, quoted table names).

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?

States a specific verb, resource and execution engine ("Run one read-only SQL statement (DuckDB dialect) over the data files"), so an agent knows exactly what this does versus profiling, sampling or explaining. It also names sibling context (list_files for folders) that anchors the tool in the toolset.

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?

Gives strong when-to-use guidance: prefer aggregation with GROUP BY/COUNT/SUM over fetching raw rows, and "use describe_file first for column names" is an explicit prerequisite step. It stops short of routing to explain_query, sample_file or profile_file for cases where this tool is the wrong choice.

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