Skip to main content
Glama
jaynasriwala

Universal Database MCP

by jaynasriwala

explain_sql_query

Preview a database's execution plan for a read-only SELECT statement to check query performance before running it.

Instructions

Return the database's execution plan for a read-only SELECT statement, so query performance can be checked before running it.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
db_uriNoA short connection name (e.g. "prod"), a full connection string for local testing, or empty ("") for the default database.
sql_queryNoA single SELECT statement to analyze.

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv1.0.0

TDQS

A3.6/5.0
Behavior3/5

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

No annotations are provided, so the description carries the full burden. It usefully discloses that the tool is non-executing and limited to read-only SELECT statements, which is the key safety trait. It does not cover failure behavior for non-SELECT input, connection/permission requirements, or whether the plan is estimated or analyzed.

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 sentence with the action front-loaded and the rationale trailing it. No filler, no repetition of the tool name.

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?

For a two-parameter read-only tool with an output schema (so return format need not be described) and full schema coverage, the description is nearly sufficient. The remaining gap is sibling routing and error behavior, both minor given the structured data available.

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 100%, so both parameters (db_uri, sql_query) are already documented in the schema, including the default-connection semantics of an empty db_uri. The description only reinforces the SELECT constraint already stated in the sql_query schema, adding little beyond the structured fields. Baseline 3 applies.

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?

States a specific verb and resource: return the execution plan for a read-only SELECT. The clause 'so query performance can be checked before running it' clarifies intent and implicitly separates it from execute_safe_query. However, it never names the sibling it competes with, so differentiation is inferential rather than explicit.

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?

The phrase 'before running it' implies this is a pre-flight check preceding execute_safe_query, and 'read-only SELECT' bounds acceptable input. But there is no explicit when-to-use/when-not statement and no alternative is named, so the routing guidance is only implied.

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