Skip to main content
Glama
SpringDamon

mcp-server-dmdb

by SpringDamon

执行只读 SELECT 查询

dm_query
Read-onlyIdempotent

Run read-only SELECT queries on a DM8 database to fetch column names and result rows. Non-SELECT statements are rejected, and results are truncated with guidance.

Instructions

在达梦 DM8 上执行一条 SELECT 语句,返回列名与结果行。只放行 SELECT:INSERT/UPDATE/DELETE/DDL/多语句/存储过程调用都会被拒绝。分页请在 SQL 里写 LIMIT ? OFFSET ? 并把数值放进 params(DM8 原生支持绑定参数,已实测)。结果会自动按行数、单元格长度、总字符数三层截断,截断提示里会给出下一步建议。BIGINT 主键超出 JS 安全整数范围时会自动改用字符串重读,保证末几位不丢。

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
sqlYes要执行的 SELECT 语句。分页请在 SQL 内写 `LIMIT ? OFFSET ?`(DM8 原生支持且可绑定参数),把数值放进 params 数组,例如 sql="SELECT * FROM t WHERE a = ? LIMIT ? OFFSET ?", params=["x", 50, 0]
paramsNo按位置绑定的参数,对应 SQL 中的 ? 占位符。禁止用它拼接标识符
max_rowsNo本次查询返回的最大行数,不传则用 DM_MAX_ROWS 默认值
timeout_msNo本次查询超时毫秒数
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.6/5.0
Behavior5/5

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

Beyond the readOnly/idempotent/non-destructive annotations, the description discloses non-obvious runtime behavior: rejection of DML/DDL/multi-statements, three-layer result truncation with follow-up suggestions, and automatic re-read of big BIGINT keys as strings. No contradiction with annotations; context is added.

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?

Four dense, purposeful sentences: core function, safety boundary, pagination pattern, and edge-case behavior. Nothing is wasted and the most important scoping information is front-loaded.

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 return shape, safety, pagination, truncation, and big-integer handling, which is substantial for a query tool with no output schema. It stops short of describing error surfaces (e.g., exact rejection message or JSON framing), but the essential invocation knowledge is present.

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?

Schema coverage is 100%, so the schema already documents parameters. The description adds practical guidance: pagination values must go in params, DM8 native binding is verified, and params must never be used to interpolate identifiers. This is meaningful extra semantic context 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 by stating '执行一条 SELECT 语句,返回列名与结果行', giving a concrete verb, resource, and output. It further narrows scope by enumerating rejected statement types, which clearly distinguishes dm_query from read-only sibling tools like dm_explain or dm_table_sample.

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?

It explicitly says only SELECT statements are permitted and states how to paginate with LIMIT ? OFFSET ? and bound params. It does not explicitly name alternative sibling tools or say when to prefer them, but the inclusion/exclusion rules are unambiguous enough for an agent to decide when to call it.

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