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

io.github.0xmortuex/duckdb-mcp

by 0xmortuex

sample_file

Preview a local CSV, Parquet, or JSON file by returning the first few rows or a random sample; set rows (1–100) to inspect data without running a full description.

Instructions

Show a few rows of a file: the first rows (mode='head') or a random sample (mode='random', scans the whole file). Cheaper than describe_file when you only want to see the data. rows is 1 to 100.

Input Schema

NameRequiredDescriptionDefault
modeNohead
pathYes
rowsNo

Output Schema

NameRequiredDescriptionDefault
resultYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A4.4/5.0
Behavior4/5

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

With no annotations, the description does real work: it discloses that mode='random' scans the entire file, which is a substantial cost signal an agent would otherwise miss, and frames the tool as cheaper than describe_file. It does not state that the tool is strictly read-only or what happens with files that cannot be parsed, so a small gap remains.

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?

Three short sentences, front-loaded with the purpose and mode semantics before the cost comparison. Every clause carries information; there is no filler or 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?

An output schema exists, so return values need not be described, and the definition covers the mode cost tradeoff and the rows bound. What is missing is whether head mode truncates a large file or whether sampling errors out on unreadable files, which would matter for a three-parameter data-inspection tool.

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 compensate, and it largely does: it defines the meaning of both enum values for mode and states the inclusive bounds for rows (1 to 100). Only path is left unexplained, which is a minor omission given its obviousness.

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 opens with a specific verb plus resource ('Show a few rows of a file') and immediately disambiguates the two operating modes, head vs random. It also names the sibling tool it is not (describe_file), so an agent can distinguish intent without opening the schema.

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 gives an explicit selection rule against a named sibling: use this instead of describe_file when you only want to see the data, since it is cheaper. There is no explicit 'when not to use' guidance (e.g. when you need types or row counts, use profile_file), but the positive routing is clear.

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