Skip to main content
Glama
sql-mcp
by ohankay

begin_transaction

Starts a transaction on a persistent SQL Server connection so subsequent execute_sql calls run inside it until commit or rollback, with optional isolation level.

Instructions

BEGIN TRANSACTION on the persistent connection. Later execute_sql calls run inside it until commit/rollback. isolation_level (optional): READ UNCOMMITTED | READ COMMITTED | REPEATABLE READ | SNAPSHOT | SERIALIZABLE.

Tool call template

This tool declares no required parameters. Add optional parameters from the input schema as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {},
    "name": "begin_transaction"
  }
}

Input Schema

NameRequiredDescriptionDefault
connectionNo
isolation_levelNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv1.1.0

TDQS

A3.8/5.0
Behavior3/5

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

Annotations already declare readOnlyHint=false, destructiveHint=false and idempotentHint=false. The description adds genuine value beyond them: the transaction binds to the persistent connection and captures all later execute_sql calls until it is terminated. It does not say what happens if a transaction is already active, whether locks are held, or whether this fails/errors in that case — meaningful omissions for a stateful 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 short lines, front-loaded with the operation and its effect, followed by the optional parameter detail. No filler or restated boilerplate.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness3/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

With no output schema and no annotations covering transaction semantics, the description needs to be self-sufficient, and it mostly is for the happy path. However the null-default `connection` parameter and the behavior under an already-open transaction are unaddressed, which an agent would need to call this correctly.

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%, so the description must carry parameter meaning, and it does for isolation_level by enumerating the five valid levels — information absent from the schema, which types it as a bare string. The `connection` parameter is never explained: neither what it selects nor what the null default implies. That leaves one of two params undocumented.

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?

States the specific operation (BEGIN TRANSACTION) and, more importantly, its scope: it acts on the persistent connection and encloses subsequent execute_sql calls. That relational statement distinguishes it from the plain query tool. It stops short of naming commit_transaction/rollback_transaction as the terminating siblings, referring only to 'commit/rollback'.

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 workflow context is clear: call this first, then run execute_sql calls inside it, then end via commit/rollback. That tells an agent when to reach for it. There is no explicit when-not guidance (e.g. behavior if a transaction is already open, or whether nesting is supported).

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