Skip to main content
Glama

edit_transaction

Apply and manage multi-file code edits as transactions, with begin, edit, commit, rollback, and undo actions to preview and revert changes safely.

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.

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