Skip to main content
Glama
atengk

mcp-server-rdbms

by atengk

sql_dml

Execute single or batch INSERT, UPDATE, and DELETE in one atomic transaction, with multi-database routing, automatic rollback on failure, and AST guards against WHERE-less changes.

Instructions

在单一数据库原子事务中执行单条或批量数据增删改 (DML) 操作。支持多数据库路由(通过 db 参数指定目标数据库连接别名,缺省时路由至默认库)。受 --allow-dml 权限门禁保护,任何单步失败全量自动回滚,并在 AST 语法树层强制拦截无 WHERE 条件的 UPDATE 与 DELETE。

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
dbNo
sqlYes

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv1.1.4

TDQS

A4.3/5.0
Behavior5/5

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

With no annotations, the description carries the full burden and does so well: atomic single-transaction execution, automatic full rollback on any step failure, an auth/authorization gate (--allow-dml), and AST-level safety interception of unfiltered UPDATE/DELETE. These are exactly the mutation-safety traits an agent needs before issuing a write.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

Three tightly packed sentences, front-loaded with the core action; the routing and gate/rollback details each add distinct value. It is dense but not padded, with no redundant restatement of the tool name.

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?

An output schema exists, so return values need not be described. Given a write tool with no annotations, the description covers atomicity, rollback, permission gating, and syntax-level guardrails, leaving no material behavioral gap for correct invocation.

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 0%, but the description compensates: it explains that db is a target connection alias with default routing when omitted, and 'single or batch' explains why sql accepts both a string and an array. It does not add SQL dialect or syntax guidance beyond that.

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 gives a specific verb and resource class: execute single or batch DML (insert/update/delete) operations, which cleanly separates it from the sibling sql_ddl (schema changes) and sql_query (reads). It never names an alternative tool explicitly, so differentiation is by operation class rather than by direct contrast.

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 states the operative conditions clearly: writes require the --allow-dml permission gate, and UPDATE/DELETE without a WHERE clause are blocked at the AST layer. That tells an agent both when this tool applies and what will be rejected, though it stops short of pointing to a sibling for read-only or DDL work.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.