Skip to main content
Glama
kenningai

Kenning PG MCP

by kenningai

explain_query

Generate a meta description for the explain_query tool from the Kenning PG MCP server, following all the provided constraints.

Instructions

Return the PostgreSQL execution plan (EXPLAIN, FORMAT JSON) for a single statement. Cheap without analyze. With analyze=true the statement is actually executed to collect real timing — the transaction is always rolled back, so even in read-write mode nothing persists, but the statement's runtime cost is fully paid. Parameters are not supported here; inline literal values instead.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
sqlYes
analyzeNo

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Behavior5/5

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

With no annotations provided, the description carries full burden and excels at it. It transparently discloses that analyze=true actually executes the statement, that the transaction always rolls back, and that despite rollback the runtime cost is incurred. This is exactly the kind of behavioral nuance an agent needs to make safe decisions about using analyze mode.

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

Conciseness4/5

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

The description is three sentences, front-loaded with the core purpose, and every sentence adds value. It's compact but covers the essential caveats. Minor inefficiency: 'for a single statement' is slightly redundant with EXPLAIN semantics, but this is a minor nit.

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?

Despite no annotations and 0% schema coverage, the description thoroughly covers the critical safety context (transaction rollback, real execution cost), parameter constraints (inline literals only), and purpose. With an output schema present and only 2 simple parameters, this description is fully adequate for safe and correct tool invocation.

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 coverage is 0%, so description must compensate. The description explains the analyze parameter's semantics well (executes for real timing, rolls back, costs runtime) and notes sql takes inline literals not parameters. However, it doesn't detail the sql parameter's format expectations beyond that, leaving the agent to infer SQL syntax requirements.

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 the tool returns a PostgreSQL EXPLAIN execution plan in JSON format for a single statement. It distinguishes itself from execute_query (which actually runs queries) by emphasizing this is EXPLAIN only, and the verb+resource ('Return the PostgreSQL execution plan') is specific and accurate.

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

Usage Guidelines5/5

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

The description explicitly explains when to use analyze=true vs false, notes that parameters are not supported (inline literals required), and clarifies the transactional rollback behavior. This gives clear guidance on how to invoke the tool correctly, particularly the important caveat that runtime cost is 'fully paid' even though the transaction rolls back.

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/kenningai/kenning-pg-mcp'

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