Skip to main content
Glama
Azzaraell

pgguard-mcp

by Azzaraell

explain_query

Shows the query plan for a read-only SELECT statement without executing it, using EXPLAIN. Respects the same read-only policy gate to block writes and restrict tables and columns.

Instructions

Show the query plan for a read-only SELECT without executing it (EXPLAIN, never EXPLAIN ANALYZE). Same policy gate as run_query.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
sqlYesA single read-only SELECT statement, checked against the same policy as run_query
Behavior4/5

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

Without annotations, the description carries full burden. It explicitly states the tool is read-only, never executes (EXPLAIN, not EXPLAIN ANALYZE), and enforces the same policy gate as run_query. This sufficiently discloses behavioral traits.

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 extremely concise with two sentences, front-loaded with the core purpose, and contains no unnecessary words.

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?

Given the tool's simplicity (1 param, no output schema), the description covers essential aspects: what it does, how it differs from run_query, and policy gate. It could be slightly more complete by mentioning output format, but is adequate.

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 coverage is 100%, so baseline is 3. The description adds value by specifying the sql parameter must be read-only and subject to the same policy as run_query, beyond the schema's minimal description.

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 clearly states it shows the query plan for a read-only SELECT without executing it, specifically using EXPLAIN. It distinguishes from siblings like run_query and sample_rows by mentioning 'never EXPLAIN ANALYZE' and 'Same policy gate as run_query'.

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 provides context by referencing the same policy as run_query, implying it's for read-only analysis. However, it does not explicitly state when not to use it or directly compare with alternatives.

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

Install Server

Other Tools

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/Azzaraell/pgguard-mcp'

If you have feedback or need assistance with the MCP directory API, please join our Discord server