Skip to main content
Glama
vrindha-k

Multi-Database AI Query Agent

by vrindha-k

explain_query

Describes SQL query structure and PostgreSQL EXPLAIN estimates without ANALYZE, so you can inspect planned execution costs and query shape before running it.

Instructions

Describe SQL structure and PostgreSQL EXPLAIN estimates, without ANALYZE.

Input Schema

NameRequiredDescriptionDefault
sqlYes
database_idYes

Output Schema

NameRequiredDescriptionDefault

No arguments

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

B3.3/5.0
Behavior3/5

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

With no annotations, the description carries the full disclosure burden, and 'without ANALYZE' does add real behavioral value: the query is planned, not executed. However, it says nothing about permissions required, side-effect safety, or how invalid SQL is handled.

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?

A single tight sentence with no filler, and the operative constraint ('without ANALYZE') is placed where it will be read. Nothing here is redundant.

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

Completeness3/5

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

An output schema exists, so return-value explanation is not required, and the ANALYZE clause covers the key semantic distinction. Still, with zero annotations the description should say more about execution safety and prerequisites for a plan-inspection tool.

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 for both parameters, and it adds no meaning for 'sql' or 'database_id'. The names are largely self-explanatory, which prevents a 1, but the description contributes nothing beyond them.

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 gives a specific verb ('Describe') with two clear resources: SQL structure and PostgreSQL EXPLAIN estimates. The clause 'without ANALYZE' distinguishes it from a query-execution tool like run_query, though it never names that sibling explicitly.

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?

Usage is only implied: an agent can infer this is for inspecting a query plan without executing it. There is no explicit 'use this when...' or exclusion naming run_query as the alternative when actual execution is wanted.

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