Skip to main content
Glama
irsyadjpp

postgres-mcp-server

by irsyadjpp

explain_query

Get PostgreSQL query execution plans to analyze and optimize SQL performance. Provides EXPLAIN output in multiple formats like text, JSON, XML, or YAML with options for costs, buffers, and analysis.

Instructions

Get query execution plan (EXPLAIN)

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
sqlYes
costsNo
formatNo
analyzeNo
buffersNo
database_nameNo
Behavior2/5

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

With no annotations provided, the description carries the full transparency burden. It fails to disclose that EXPLAIN without ANALYZE does not execute the query, while ANALYZE does, nor does it mention any side effects or read-only nature. This is a significant gap for a tool that can execute queries.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness3/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is one short sentence with no fluff, making it concise in word count. However, it is under-specified for a tool with six parameters and nontrivial behavior, so it is not appropriately sized for the tool's complexity.

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

Completeness2/5

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

Given the absence of annotations and output schema, and the presence of six parameters including analyze (which executes the query), the description is incomplete. It does not explain return formats, how analyze or buffers affect behavior, or integration with sibling database tools.

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

Parameters1/5

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

Schema description coverage is 0%, so the description should compensate. It does not mention any of the six parameters (sql, costs, format, analyze, buffers, database_name) or their meanings. The description adds zero semantic value beyond the schema's structured field definitions.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description uses the specific verb 'Get' and resource 'query execution plan', with the parenthetical '(EXPLAIN)' clarifying the database operation. It is clear and distinguishes from siblings like query or describe_table, though it lacks detail on its exact scope.

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

Usage Guidelines2/5

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

No guidance is provided on when to use this tool versus alternatives such as query or get_slow_queries. There is no mention of prerequisites, scenarios, or when not to use it.

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/irsyadjpp/postgres-mcp-server'

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