Skip to main content
Glama
joyous-coder

universal-db-mcp

by joyous-coder

explain_query_with_advice

Run EXPLAIN on a SQL query to get execution plan and index recommendations. Use literal values or ? with params array to avoid syntax errors from ${} placeholders.

Instructions

EXPLAIN + 索引建议。⚠️ 不支持 ${} 模板占位符(会被作为 SQL 字面量传给 EXPLAIN → 语法错)。用字面量值或 ? + params 数组。

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
sqlYes
persistNotrue = 持久化 plan 以便后续 compare_query_plans
profileNameNo

Schema Changelog

Changes observed during successful MCP inspections. Dates show when Glama detected each change.

  1. First observedv5.0.2

TDQS

C2.9/5.0
Behavior3/5

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

The description usefully discloses that ${} placeholders are passed literally to EXPLAIN and cause syntax errors, and it suggests using literals or a params array. However, with no annotations present, it does not clarify whether the operation is read-only, whether it modifies anything, or what the returned advice/plan looks like.

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 short and front-loaded with the core purpose, and the critical placeholder warning is included without excess words. The fragment structure and abrupt transition from purpose to warning slightly reduce readability, but every word is functional.

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

Completeness2/5

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

With no annotations, no output schema, and a minimal description, an agent lacks essential context about return values, side effects, active-profile requirements, and how to provide parameters. The discrepancy between the mentioned 'params array' and the actual schema further undermines completeness.

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 only 33%, so the description must compensate. It does add meaningful guidance for the sql parameter (no ${}, use literals or params), but it references a 'params array' that does not exist in the input schema, creating confusion. The profileName parameter is left completely undocumented.

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 'EXPLAIN + 索引建议' clearly identifies the tool as an EXPLAIN operation with an added index-advice feature, which distinguishes it from the sibling explain_query. However, it is a fragment rather than a full sentence, and it does not explicitly state the resource (e.g., 'on a SQL query').

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines2/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

No guidance is given about when to use this tool versus explain_query, execute_query, or lint_sql. The only instruction is a formatting constraint about ${} placeholders, which is a how-to detail rather than a when-to-use recommendation or exclusion of alternatives.

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

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/joyous-coder/universal-db-mcp'

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