Skip to main content
Glama
SpringDamon

mcp-server-dmdb

by SpringDamon

查看 SQL 执行计划

dm_explain
Read-onlyIdempotent

Returns a SELECT statement's execution plan on DM8 to troubleshoot slow queries and confirm index usage, with operation, table, index, scan type, row count, and cost.

Instructions

返回一条 SELECT 语句在达梦 DM8 上的执行计划(走 EXPLAIN FOR,达梦的裸 EXPLAIN 不返回结果集)。输出包含 OPERATION、TAB_NAME、IDX_NAME、SCAN_TYPE、ROW_NUMS、COST 等列。排查慢查询、确认有没有走索引时调用。只接受 SELECT;EXPLAIN 不支持绑定参数,传入的 params 会被内联为字面量(经转义)。

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
sqlYes要分析执行计划的 SELECT 语句
paramsNoSQL 中的 ? 参数值。EXPLAIN 不支持绑定参数,这里的值会被安全地内联为字面量
response_formatNo输出格式markdown

Schema Changelog

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

  1. First observedv1.0.3

TDQS

A4.5/5.0
Behavior5/5

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

Annotations already cover readOnlyHint=true, idempotentHint=true, destructiveHint=false, and the description adds substantial context on top: it discloses the implementation quirk that Dameng's bare EXPLAIN returns no result set so EXPLAIN FOR is used, enumerates the output columns (OPERATION, TAB_NAME, IDX_NAME, SCAN_TYPE, ROW_NUMS, COST), and warns that params are inlined as escaped literals because bind parameters are unsupported. These are exactly the non-obvious behaviors an agent needs.

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 a compact set of four sentences with no filler. The main purpose is front-loaded, and each sentence earns its place: the function, the EXPLAIN FOR quirk, the output columns, the call context, and the constraints. The length is proportionate to the tool's complexity.

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?

Even though there is no output schema, the description discloses the return columns so an agent knows what the result will look like. Combined with 100% parameter schema coverage and annotations covering the safety profile, nothing needed to invoke the tool correctly is missing. Minor omissions like error behavior for non-SELECT input are acceptable given the SELECT-only constraint is already stated.

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 schema already documents all three parameters and the baseline is 3. The description reinforces the params-inlining behavior, but the schema's params description already states the same thing ('EXPLAIN 不支持绑定参数,这里的值会被安全地内联为字面量'), so the description adds little semantic value beyond the schema.

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 opens with a specific verb+resource: '返回一条 SELECT 语句在达梦 DM8 上的执行计划', which unambiguously states what the tool does. It also differentiates from siblings like dm_query by framing this as execution-plan analysis rather than query execution, and reinforces the purpose with the use case '排查慢查询、确认有没有走索引时调用'.

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

Usage Guidelines4/5

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

The description explicitly states when to call ('排查慢查询、确认有没有走索引时调用') and gives a clear exclusion ('只接受 SELECT'). It does not, however, name an alternative sibling tool (e.g., pointing to dm_query for actually executing the query), so the when-not guidance is situational but not tied to a named alternative.

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/SpringDamon/mcp-server-dmdb'

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