Skip to main content
Glama
apsolut

dbeaver-mcp

by apsolut

explain_query

Inspect a Postgres query plan for a single statement. Optionally execute read-only queries to get real execution timings.

Instructions

Show the Postgres query plan for one statement. analyze: true runs it for real timings and is refused on anything that writes.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
nameYesConnection name or id
queryYesA single statement
analyzeNoExecute the statement to get real timings (reads only)
verboseNoInclude VERBOSE output

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv1.6.1

TDQS

A4.2/5.0
Behavior4/5

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

With no annotations provided, the description carries the full burden of behavioral disclosure. It explicitly discloses that analyze executes the statement for real timings and that write operations are refused. This is the most critical safety behavior. It does not mention output format or connection authorization, but the main mutation guard is covered.

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?

Two dense sentences with no wasted words. The core purpose is front-loaded, and the important analyze caveat is stated immediately after. Every clause earns its place.

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 4-parameter tool with no annotations and no output schema, the description covers the essential purpose and the key side-effect risk. Parameter details are fully handled by the schema. It would benefit from explicitly routing users to execute_query or write_query for actual execution, but the core information needed for safe invocation is present.

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 description coverage is 100%, so the baseline is 3. The description adds some semantic weight to analyze by explaining it 'runs it for real timings and is refused on anything that writes,' which extends the schema's 'reads only' note slightly. However, it adds little meaning for name, query, or verbose beyond what the schema already documents.

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 uses a specific verb plus resource: 'Show the Postgres query plan for one statement.' The phrase 'query plan' clearly distinguishes it from siblings like execute_query and write_query, even though no alternative is named.

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: this tool is for explaining a single statement, not for general execution. It also provides a concrete usage condition for analyze, including the exclusion 'refused on anything that writes.' It does not explicitly name alternatives, but the behavior-based guidance is strong.

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