Skip to main content
Glama
nkrimmel

mcp-duckdb-analyst

by nkrimmel

query

Read-onlyIdempotent

Execute read-only SQL statements on local CSV, Parquet, JSON files or DuckDB, returning results as JSON rows, Markdown tables, and execution time with enforced row limits.

Instructions

Run one read-only SQL statement (SELECT / WITH / DESCRIBE / SHOW / SUMMARIZE / EXPLAIN). Returns columns, JSON rows, a Markdown table, a truncated flag and the elapsed time. The row limit is min(limit, server max rows).

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
sqlYes
limitNo

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
sqlYesThe statement as executed (after guard rewriting).
rowsYesRow values, JSON-safe (dates as ISO strings).
notesNo
columnsYes
markdownYesThe same rows rendered as a Markdown table.
row_countYesNumber of rows returned (after truncation).
row_limitYesRow cap that was applied, if any.
truncatedYesTrue if more rows existed than were returned.
elapsed_msYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A4.1/5.0
Behavior4/5

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

Annotations already declare the tool read-only, idempotent, and non-destructive, so the description's main value is its return contract: columns, JSON rows, Markdown table, truncated flag, elapsed time, and the row-limit rule. This meaningfully supplements the annotations, though failure/error behavior is not addressed.

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 three compact sentences with no filler. The core purpose is front-loaded, and the statement-type list, return payload, and row-limit behavior each earn their place without redundancy.

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 read-only query tool with a supporting output schema, the description covers the essential operational details: what statements can run, what the response includes, and how limits are applied. The only notable gaps are the null-limit behavior and explicit sibling routing, both minor for this tool's safety profile.

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?

Schema description coverage is 0%, so the description must carry the parameter semantics. It implicitly defines 'sql' by listing supported statement types and explicitly defines 'limit' with 'min(limit, server max rows)'. It does not clarify what a null limit means, but the schema supplies the default.

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 description opens with a precise verb and resource: 'Run one read-only SQL statement,' and enumerates exactly which statement types are accepted. It clearly differentiates the tool from table/schema helpers like list_tables or describe_table, though it does not explicitly disambiguate from the explain_query sibling even though EXPLAIN is allowed.

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?

The description gives clear context for when to use this tool: for a single, read-only SQL statement among the listed types. It explicitly excludes writes and multi-statement calls, but it does not name sibling tools or state when a specialized tool like explain_query or sample_rows would be preferable.

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