Skip to main content
Glama
clidey

whodb-cli

Official

whodb_explain

Read-onlyIdempotent

Analyze SQL query execution plans with native EXPLAIN output to identify excessive data scans before running the query.

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
Behavior5/5

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

Annotations already declare readOnlyHint and idempotentHint, indicating safety. The description adds context: 'database-native explain mode', notes that output is database-specific, and explains return format. No contradictions with annotations.

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 well-structured with sections, bullet points, and a JSON example. Every sentence adds value, and the length is appropriate for the tool's simplicity.

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

Completeness5/5

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

Given the tool's low complexity and rich annotations, the description covers purpose, usage, example, common mistakes, and return format. With output schema present, it is fully complete.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters4/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Input schema has 100% coverage for both parameters. The description adds a usage example and clarifies that the query should be a SQL string. However, there is a slight inconsistency: schema marks 'connection' as required, but description says it is 'optional if only one exists'. This minor mismatch prevents a 5.

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 'Run EXPLAIN for a SQL query using the database's native explain mode', specifying the verb, resource, and mode. It distinguishes itself from sibling tool whodb_query by noting that whodb_explain is for understanding query plans, not fetching data.

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?

Explicit 'Best for:' and 'Not recommended for:' sections provide clear guidance on when to use the tool. Also includes 'Common mistakes' to help avoid misuse. This is exemplary usage guidance.

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