Skip to main content
Glama
thhart

database-mcp

by thhart

explain

Reveal the query plan for any SQL statement to identify performance bottlenecks. Set analyze to true to execute and get actual timings.

Instructions

Show the query plan (EXPLAIN). Set analyze=true to actually run the statement and get real timings.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
sqlYes
paramsNo
analyzeNo
profileNo

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
resultYes
Behavior4/5

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

With no annotations provided, the description carries the full burden and it does disclose the key behavioral trait: without analyze, it only shows the plan; with analyze, it executes and returns real timings. This is important and useful. It does not mention side effects or permissions, but for an explain tool, the execution distinction is the most critical behavior.

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?

Two sentences with no filler. The core purpose is front-loaded, and the analyze behavior is stated in a compact second sentence. Every word earns its place.

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?

The description is adequate for the core purpose but leaves parameter semantics underspecified. Given that an output schema exists (so the return format is defined elsewhere) and the tool's parameters have simple types, the description is minimally complete. However, the lack of guidance on params and profile is a gap that an agent must resolve by inferring from context.

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 explains one of four parameters (analyze). The sql parameter is implied but not described, and params and profile are not explained at all. This leaves the agent guessing about how to pass bind parameters or choose a profile.

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 states a specific verb 'Show' and resource 'the query plan', and the EXPLAIN hint makes the tool's purpose unmistakable. It differentiates from siblings like 'query' and 'fetch' by implying this produces a plan rather than results.

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 description makes it clear the primary use is to obtain a query plan, and mentions that analyze=true changes behavior to execute. However, it does not explicitly say when to use this versus alternatives (e.g., 'query' for execution), nor does it list any exclusions. The guidance is implied but not explicit.

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/thhart/database-mcp'

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