Skip to main content
Glama
clidey

whodb-cli

Official

whodb_explain

Read-onlyIdempotent

Analyze SQL query performance with native EXPLAIN output to understand query plans and prevent excessive data scans.

Instructions

Run EXPLAIN for a SQL query using the database's native explain mode.

Best for: Understanding query plans; checking whether a query will scan too much data before you run the real query. Not recommended for: Fetching actual data (use whodb_query for that). Common mistakes: Passing a non-SQL string; forgetting that EXPLAIN output is database-specific.

Usage Example:

{
  "name": "whodb_explain",
  "arguments": {
    "connection": "mydb",
    "query": "SELECT * FROM users WHERE email LIKE '%@example.com' LIMIT 10"
  }
}

Returns: The database-native EXPLAIN output with columns and rows, ready for follow-up analysis.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
connectionYesConnection name (optional if only one exists)
queryYesSQL query to explain

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
columnsYes
column_typesNo
rowsYes
errorNo
request_idNo
Behavior4/5

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

Annotations already indicate readOnlyHint=true and idempotentHint=true, so the description does not need to repeat those. However, it adds valuable context: EXPLAIN output is database-specific, and the tool returns the database-native EXPLAIN output with columns and rows. This goes beyond annotations and helps the agent understand the behavior.

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 structured with clear headings (Best for, Not recommended for, Common mistakes, Usage Example, Returns). It is informative but could be slightly more concise; however, the structure aids readability and every section serves a purpose.

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?

The description covers the tool's purpose, usage guidelines, common mistakes, an example, and the return format. Given that an output schema exists, the description does not need to detail return values, but it still mentions the output is database-specific with columns and rows. The tool is simple and the description is sufficiently complete for an agent to use it correctly.

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% (both parameters fully described in the schema). The description does not add new semantic meaning for the parameters beyond the schema, but it provides a usage example that illustrates how to format the arguments. This is adequate but not exceptional, warranting a baseline score of 3.

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 runs EXPLAIN for a SQL query using the database's native explain mode, which is a specific verb+resource combination. It also explicitly distinguishes itself from the sibling tool whodb_query by stating that fetching actual data is not recommended and that whodb_query should be used instead.

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 provides explicit when-to-use guidance (best for understanding query plans, checking before running real query) and when-not-to-use guidance (not for fetching actual data, use whodb_query). It also lists common mistakes like passing non-SQL strings or forgetting database-specific output, which helps the agent avoid errors.

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/clidey/whodb'

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