Skip to main content
Glama
nkrimmel

mcp-duckdb-analyst

by nkrimmel

explain_query

Read-onlyIdempotent

View DuckDB's physical query plan for a SELECT statement without executing it, enabling query optimization and safe analysis.

Instructions

Show DuckDB's physical query plan for a SELECT without running it.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
sqlYes

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
sqlYes
planYes
elapsed_msYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A4.3/5.0
Behavior4/5

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

The description adds behavioral value beyond the annotations by stating the query is not executed. It also clarifies the output is a physical query plan. This aligns with the readOnly and idempotent hints without contradicting them.

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 that front-loads the tool's purpose and adds the key behavioral distinction ('without running it'). There is no filler or redundant information.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness5/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

For a simple one-parameter tool with an output schema and complete safety annotations, the description covers the purpose, accepted input, and non-execution behavior. Nothing essential is missing.

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?

The schema provides no description for the 'sql' parameter (0% coverage), so the description carries some burden. It clarifies that the parameter should be a SELECT statement, but does not provide format, dialect, or constraint details. For a single self-named parameter, this is adequate but not rich.

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 verb ('Show'), a specific resource ('DuckDB's physical query plan'), and a scope ('for a SELECT'). It clearly distinguishes this from running a query, especially in contrast to the sibling 'query' tool.

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 phrase 'without running it' makes clear this is for plan inspection rather than execution, and limiting to SELECT gives a clear applicability boundary. It does not explicitly name alternatives or say when not to use it, but enough context is present.

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