Skip to main content
Glama
Yukuiii

any-db-mcp

by Yukuiii

transaction

Execute a sequence of SQL statements as one unit: if any fails, all changes roll back; if all succeed, changes commit.

Instructions

在数据库事务中按顺序执行一组 SQL。任一语句失败则整体回滚;全部成功才提交。权限规则与 execute 一致:readonly 禁用;readwrite 仅 DML;full 支持 DML + DDL。常用于多步写操作的原子性保证(如转账、订单创建)。

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
sqlsYes要按顺序执行的 SQL 语句数组,至少一条

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv1.2.2

TDQS

A4.2/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 behavioral burden and does well: it discloses rollback-on-any-failure, commit-only-on-full-success, and the permission matrix (readonly disabled, readwrite DML-only, full DML+DDL). It omits failure/error return behavior and whether SELECTs are permitted inside, leaving a small gap for a mutation tool.

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 tight sentences, front-loaded with the core transactional behavior, then permissions, then use cases. Every sentence adds distinct information with no redundancy.

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?

For a one-parameter mutation tool with no annotations and no output schema, the description covers enough to call it confidently: atomicity contract, permission gating, and typical scenarios. It could be fuller on result/error reporting or handling of non-DML statements, but nothing essential is missing.

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% and the single 'sqls' parameter is already documented as an ordered array requiring at least one statement. The description's mention of sequential execution adds marginal reinforcement but no new syntax or format detail, so the baseline 3 applies.

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?

States a specific verb (execute) and resource (a group of SQL statements) with the defining constraint that they run inside a single database transaction. The all-or-nothing semantics clearly separate it from the sibling 'execute', which runs statements without an atomic wrapper.

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?

Gives concrete usage context ('atomicity for multi-step writes such as transfers and order creation') and references 'execute' for the permission model, implying that single/non-atomic statements belong there. It stops short of an explicit when-not-to-use rule, so it is not quite a 5.

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