Skip to main content
Glama

edit_transaction

Manage multi-file edits with transaction support: begin, edit, commit, rollback, and undo changes with preview and atomicity.

Instructions

DEFAULT multi-file edit path with rollback/preview/undo (begin→edit→commit). Use when unsure about changes. Single-file? edit_batch. For string params containing double quotes/backslashes, keep JSON escaping consistent across the whole string (escape uniformly or prefer full-width quotes), otherwise client-side parameter parsing fails.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
fileNoSingle file path relative to workspace_dir (required for action=edit).
nameNoTransaction name (required for action=begin).
editsNoArray of {old_string,new_string}. Required for edit.
filesNoMultiple file paths relative to workspace_dir. Same edits applied to all (broadcast mode).
actionYesTransaction action to perform.
atomicNoFor edit_multi: all-or-nothing (default: true).
txn_idNoTransaction ID (required for edit, edit_multi, commit, undo_commit, rollback, info).
file_editsNoPer-file edits for edit_multi: [{file, edits}]. Overrides files+edits.
workspace_dirYesREQUIRED: project root (abs). reindex first if new.

Schema Changelog

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

  1. First observed

TDQS

A4.6/5.0
Behavior4/5

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

With no annotations, the description discloses the transactional workflow (begin→edit→commit) and mentions rollback/preview/undo, indicating state management. It also warns about JSON escaping inconsistencies causing client-side parsing failures. While not detailing every side effect, it provides meaningful behavioral context beyond the schema.

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 sentences, front-loaded with purpose, followed by usage guidance and a technical caution. No wasted words.

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 complex tool with 9 parameters and 7 actions, the description leverages the schema's parameter descriptions and adds the core workflow and usage context. While an example would be helpful, the combination of schema and description is sufficient for a capable agent.

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 covers 100% of parameters, but the description adds workflow context linking actions (begin→edit→commit) and practical guidance on consistent JSON escaping for string parameters containing quotes or backslashes. This goes beyond schema descriptions.

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?

Clearly states it is the default multi-file edit path with transactional operations (begin, edit, commit, rollback/undo). Explicitly distinguishes from edit_batch for single-file edits, providing a specific verb+resource and sibling differentiation.

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 says 'Use when unsure about changes' and directs single-file edits to edit_batch. This gives clear when-to-use and alternative guidance.

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/wulun811/LiuHe'

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