Skip to main content
Glama
SpringDamon

mcp-server-dmdb

by SpringDamon

统计表行数

dm_table_count
Read-onlyIdempotent

Get the row count of a table using exact COUNT(*) by default, or use statistics-based estimates for large tables when exact counts are too costly.

Instructions

返回一张表的行数。默认执行精确 COUNT(*)。注意:达梦 ALL_TABLES.NUM_ROWS 来自统计信息,本库多数表未收集统计信息,该值通常为 NULL —— 所以不要拿 dm_list_tables 里的 NUM_ROWS 当真实行数,要用本工具。大表可以把 exact 设为 false,只读取统计估算值(可能不可用)。

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
exactNo是否执行精确 COUNT(*)。默认 true;大表可设 false 只取统计信息估算值
ownerNo模式名,table 未带前缀时使用
tableYes表名,支持 "TABLE" 或 "SCHEMA.TABLE",不区分大小写
response_formatNo输出格式markdown

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
tableYes
exactCountYes
lastAnalyzedYes
estimatedRowsYes

Schema Changelog

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

  1. First observedv1.0.3

TDQS

A4.9/5.0
Behavior5/5

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

Beyond the readOnly/idempotent annotations, the description discloses that the default is exact COUNT(*), that exact=false reads an estimate that may be unavailable because most tables lack statistics, and that ALL_TABLES.NUM_ROWS is unreliable. This adds real behavioral context and does not contradict the 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?

Three concise sentences: what it does, a critical caveat, and a usage tip. Every sentence carries necessary information and the main action is front-loaded.

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?

For a read-only row-count tool with a full schema and output schema, the description covers the essential caveats (NUM_ROWS unreliable, exact=false fallback) and points to the right sibling. Nothing needed to call it correctly is missing.

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 baseline is 3. The description adds value by explaining the practical consequence of exact=false in this database (statistics usually unavailable), which enriches the schema's parameter descriptions.

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 plus resource. It also distinguishes itself from dm_list_tables by warning that NUM_ROWS is usually NULL, so an agent can immediately tell this tool from its sibling.

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?

It explicitly instructs not to use dm_list_tables' NUM_ROWS as the real row count and to use this tool instead. It also gives usage guidance for large tables: set exact=false to use statistical estimates when available.

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