Skip to main content
Glama
joyous-coder

universal-db-mcp

by joyous-coder

compare_query_plans

Compare two saved execution plans for the same query hash to identify performance differences. Requires at least two persisted explain results with matching queryHash.

Instructions

比较两个保存的执行计划。⚠️ 需先对相同 queryHash 跑 ≥2 次 explain_query_with_advice({persist:true})。否则返回 "need at least 2 entries with the same queryHash"。

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
entryAYesentry id A
entryBYesentry id B
queryHashYes要比较的 queryHash(query 文本 hash)

Schema Changelog

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

  1. First observedv5.0.2

TDQS

A4.1/5.0
Behavior3/5

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

With no annotations present, the description carries the full burden of behavioral disclosure. It does disclose the required precondition and the resulting error message, which is useful. However, it does not describe what the comparison output looks like, whether the operation has side effects, or any read-only guarantees, so behavioral transparency is only partial.

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 just two short sentences. The warning and prerequisite are front-loaded, and every sentence earns its place without repetition or filler.

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 covers the core action, the precondition, and the failure case, which is important context. However, there is no output schema and the description does not explain what the comparison result will be, leaving a gap for an agent trying to interpret the tool's return value.

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 description coverage is 100%, so the baseline is 3. The description does add contextual meaning to queryHash by linking it to the prerequisite and error condition, but entryA and entryB are only described as entry ids in the schema and the description adds no extra semantics for them.

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 compares two saved execution plans, using a specific verb and resource. It is naturally distinguished from sibling tools like explain_query, list_query_plans, and explain_query_with_advice because it focuses on comparing previously saved plans.

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 explicitly states the prerequisite of running explain_query_with_advice({persist:true}) at least twice with the same queryHash before using this tool. It also names the exact error that occurs when this condition is not met, which is strong practical guidance.

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