Skip to main content
Glama
nkrimmel

mcp-duckdb-analyst

by nkrimmel

sample_rows

Read-onlyIdempotent

Retrieve a reproducible random sample of rows from a table for quick data inspection and analysis.

Instructions

A reproducible random sample of n rows from a table (n is capped at max rows).

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
nNo
nameYes

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/5.0
Behavior4/5

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

Annotations already convey read-only, idempotent, and non-destructive behavior. The description adds that the sample is reproducible and that n is capped at max rows, which are useful behavioral details beyond the annotations. No contradiction with annotations.

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?

A single sentence with no filler. Every keyword—reproducible, random sample, n, capped—adds meaningful information, and the most important detail is front-loaded.

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 simple two-parameter read-only tool with a safety annotation set and an output schema, the description is mostly sufficient. The main gaps are the undefined 'max rows' limit and the implicit mapping of 'name' to a table, but these are minor and unlikely to prevent correct invocation.

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?

With 0% schema description coverage, the description must explain the parameters. It clarifies that n is the row count and references a table, but it never explicitly maps the required 'name' parameter to the table name, leaving that to inference. This is only partial compensation.

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 states a specific action (sample), a resource (rows from a table), and the key modifier 'reproducible random'. This clearly distinguishes it from sibling tools like query, profile_table, and describe_table, even without naming them.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines3/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The phrase 'random sample' implies when to use the tool, but there is no explicit guidance about when to choose sample_rows over query or profile_table, and no exclusions or alternatives are mentioned. Usage is inferred, not stated.

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