Skip to main content
Glama

Transaction Commit

transaction-commit
Destructive

Writes active transaction changes to source files after validating the expected snapshot, ending the transaction; preview changes first and use rollback to discard them. Does not create a Git commit.

Instructions

Writes the active transaction changes to source files. Inspect transaction-preview first; use transaction-rollback to discard changes instead. Supply the current expectedSnapshot. Transactional mode requests client-mediated confirmation unless already approved for this Host session; autonomous-trusted mode does not prompt. A completed write ends the transaction; check committed and the returned transaction state, because an empty revision returns NoChange and leaves the transaction active. Keep commit-owned paths free of concurrent edits during file application. This does not create a Git commit.

Input Schema

NameRequiredDescriptionDefault
workspaceNoProvide workspaceId, alias, path, or any combination.
expectedSnapshotYesEcho the snapshot returned with the data or transaction state used to construct this request.

Output Schema

NameRequiredDescriptionDefault

No arguments

Schema Changelog

Changes observed during successful MCP inspections.

  1. Addedv1.0.6

TDQS

A4.9/5.0
Behavior5/5

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

Annotations already declare destructiveHint=true and idempotentHint=false, but the description goes well beyond them: it explains confirmation prompts in transactional vs autonomous-trusted mode, that a completed write ends the transaction, and that an empty revision yields NoChange while leaving the transaction active.

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?

Front-loaded with the action, then alternatives, parameters, approval model, completion semantics, and a concurrency caveat. Every sentence carries distinct operational information with no filler.

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 destructive, non-idempotent, client-confirmation-gated mutation, this covers approval flow, failure modes, state transitions, and concurrency hazards. An output schema exists, so the description rightly only points to the fields worth checking rather than enumerating return values.

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% and the schema already documents expectedSnapshot's echoed-snapshot semantics, so the baseline is 3. The description adds value by tying the snapshot to call outcomes — the expected snapshot must be current, and a stale or empty revision produces NoChange.

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?

Opens with a specific verb and resource: 'Writes the active transaction changes to source files.' It also disambiguates from a similarly named concept with 'This does not create a Git commit,' so an agent will not confuse it with version-control operations.

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?

Explicitly routes to siblings: inspect transaction-preview first, use transaction-rollback to discard. It also states the preconditions for a successful call (supply current expectedSnapshot, avoid concurrent edits on commit-owned paths) and the mode-dependent confirmation behavior.

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