Skip to main content
Glama
vk-ai

PgGuard Agent

by vk-ai

explain_query

Explain how PostgreSQL executes a SQL query by generating an execution plan, with optional ANALYZE when permitted by policy. Identify performance issues before running queries.

Instructions

EXPLAIN a query; ANALYZE optional and gated by policy

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
sqlYes
analyzeNo

Schema Changelog

Changes observed during successful MCP inspections. Dates show when Glama detected each change.

  1. First observedv1.0.0

TDQS

C2.8/5.0
Behavior2/5

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

No annotations are provided, so the description bears the full burden of disclosing behavior. It reveals that ANALYZE is policy-gated but does not disclose that ANALYZE typically executes the query and can have side effects, nor does it state whether plain EXPLAIN is read-only.

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 compact two-clause sentence with no filler, and the core operation is front-loaded before the optional variant. Every part carries meaning.

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?

For a tool with no output schema and no annotations, the description leaves key operational context unstated: whether ANALYZE executes the query, what policy failure looks like, and what the call returns. The two-parameter surface is simple, but the missing behavior and return-value context make it incomplete.

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?

Schema description coverage is 0%, so the description must compensate, but it only loosely maps 'query' to sql and 'ANALYZE optional' to analyze. It does not clarify what kinds of SQL are accepted, what the boolean controls beyond the SQL keyword, or what output the agent should expect.

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 names a specific operation, EXPLAIN, and a resource, the supplied query, which distinguishes it from sibling tools like run_select and run_dml. It stops short of a 5 because it never explicitly says this returns an execution plan rather than executing the query.

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?

There is no guidance about when to choose explain_query over run_select, run_dml, or run_ddl, nor any statement about the intended scenario such as inspecting a plan before execution. The only usage hint is that ANALYZE is optional and policy-gated, which is a constraint rather than a use-case guide.

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

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/vk-ai/pg-governance-agent'

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