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

io.github.0xmortuex/duckdb-mcp

by 0xmortuex

describe_file

Inspects a CSV, Parquet, or JSON file to reveal exact column names, auto-detected types, row count, and sample rows before writing SQL queries.

Instructions

Show a file's schema (column names and types), its row count and a few sample rows.

path is relative to an allowed folder (as list_files shows it) or absolute inside one. Column types are DuckDB's auto-detected types, which is what SQL will see. The row count of a CSV/JSON file needs a full scan; Parquet answers from metadata. Use this before writing a query, to get exact column names.

Input Schema

NameRequiredDescriptionDefault
pathYes
sample_rowsNo

Output Schema

NameRequiredDescriptionDefault
resultYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A4/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 burden and does well: it discloses that the row count requires a full scan on CSV/JSON but comes from metadata for Parquet, and that column types are DuckDB's auto-detected types (which is what SQL will see). It does not state the read-only/error behavior or what happens with an invalid path, but the cost and type-fidelity disclosures are genuinely valuable.

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 output shape and main use case are front-loaded in the opening sentence, with path semantics and scan-cost caveats following in short, purposeful lines. Nothing is redundant.

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 values need no explanation, and the cost and type caveats are covered for a read-only inspection tool. The one real gap is the undocumented `sample_rows` control, which an agent must guess at.

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?

Schema coverage is 0%, so the description must explain both parameters, and it covers `path` well (relative to an allowed folder as `list_files` shows it, or absolute inside one). It never explains the `sample_rows` parameter — not its name, default of 5, or whether 0 disables sampling — leaving one of two parameters fully undocumented.

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 first sentence gives a specific verb and resource: it shows a file's schema (column names and types), row count, and sample rows. That is clearly distinct from a raw query tool, but it is not differentiated from the overlapping siblings `sample_file` and `profile_file`, which the description never mentions.

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?

"Use this before writing a query, to get exact column names" gives a clear trigger condition for choosing this tool. However, it never names an alternative or a when-not-to-use case, even though `profile_file` and `sample_file` sit right next to it in the sibling list and appear to overlap.

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