Skip to main content
Glama
PlbKin190

postgres-mcp-lab

by PlbKin190

explain

Read-onlyIdempotent

Get a PostgreSQL execution plan for a SELECT or read-only WITH query without running it, using JSON output to analyze query performance.

Instructions

Return a JSON execution plan without ANALYZE; the query is not executed.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
sqlYesOne SELECT or read-only WITH statement; no trailing semicolon.
paramsNo
timeout_msNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv1.0.0

TDQS

A3.9/5.0
Behavior4/5

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

Annotations already provide readOnlyHint, idempotentHint, and destructiveHint. The description adds meaningful nuance beyond those annotations by clarifying that the query is not actually executed and that the output is a JSON execution plan. This is valuable given no output schema is present, and there is no contradiction with the 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?

The description is a single, front-loaded sentence with no wasted words. It states the core behavior first and then clarifies the critical caveat that the query is not executed.

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 explain-style tool, the description plus annotations cover the safety profile and the output format. The main missing piece is guidance on params and timeout_ms, but the core behavior is fully specified and the schema covers sql constraints.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters2/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

The tool description says nothing about sql, params, or timeout_ms. Schema description coverage is only 33% (sql has a description, but params and timeout_ms do not), and the description does not compensate for that gap, leaving parameter semantics under-specified.

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 and resource: it returns a JSON execution plan without ANALYZE. The explicit 'query is not executed' clearly distinguishes this from the sibling query tool, so there is no ambiguity about what the tool does.

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 description implies that this tool is for planning rather than executing, and that query should be used when results are needed. However, it never explicitly names alternatives or states when not to use this tool, so usage guidance is only implied rather than direct.

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

Deploy Server

Other Tools