Skip to main content
Glama
TGich

dm_mcp_server

by TGich

execute_sql_file

Run SQL from an external file to process oversized queries. Supports pagination via offset/limit, optional result fetching, and comment stripping before execution.

Instructions

读取并执行 SQL 文件,用于处理超长 SQL。

文件路径必须位于 DAMENG_SQL_FILE_ALLOWED_DIRS 白名单目录内。 文件中的 SQL 注释会在校验和执行前剥离,字符串字面量内的内容不受影响。

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
limitNo
offsetNo
encodingNoutf-8
file_pathYes
fetch_resultsNo
stop_on_errorNo

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
resultYes

Schema Changelog

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

  1. First observedv2.6.2

TDQS

A3.6/5.0
Behavior4/5

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

With no annotations, the description carries the full transparency burden. It discloses two important behaviors: the file path must be inside the DAMENG_SQL_FILE_ALLOWED_DIRS whitelist, and SQL comments are stripped before validation/execution while string literals are unaffected. This is meaningful beyond the schema, though it does not mention mutation risks or error behavior.

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 compact: three sentences that front-load the core purpose, then add the critical path whitelist constraint and comment-stripping behavior. No filler or redundant repetition of the tool name.

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?

While the description covers the key file-path constraint and a useful preprocessing behavior, it omits guidance on several operationally important aspects: what limit/offset/fetch_results/stop_on_error control, whether file execution can modify data, and how this tool relates to execute_sql for non-long queries. The presence of an output schema reduces the need to document return values, but parameter semantics remain incomplete.

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 0%, so the description must compensate, but it only sheds light on file_path (via the whitelist constraint). The remaining parameters—limit, offset, encoding, fetch_results, and stop_on_error—are not given any semantic explanation in the description, leaving the agent to guess their roles.

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 clearly states that the tool reads and executes a SQL file, and explicitly positions it for handling ultra-long SQL, which differentiates it from the sibling execute_sql. It does not explicitly name the sibling or define the exact length threshold, so it stops short of a perfect 5.

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 phrase '用于处理超长 SQL' provides clear context for when to use this tool: when SQL is too long to handle inline. It does not explicitly state when not to use it or name alternative tools, but the intended use case is unambiguous enough for an agent to make a reasonable selection.

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/TGich/dm_mcp_server'

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