Batch edit
batch_edit
BatchEditTool — atomic batch file editing for AI agents.
Registered as batch_edit via the axm.tools entry point.
BatchEditTool
Atomic batch file editing for AI agents.
Replaces, creates, and deletes files in a single atomic operation.
Registered as batch_edit via axm.tools entry point.
Source code in packages/axm-edit/src/axm_edit/tools/batch_edit.py
name
property
Tool name used for MCP registration.
execute(*, path='.', operations=None, lint=True, lint_diff=True, lint_diff_max_ratio=0.5, **kwargs)
Execute a batch of file operations atomically.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
path
|
str
|
Project root directory. |
'.'
|
operations
|
list[dict[str, object]] | None
|
List of operation dicts with |
None
|
lint
|
bool
|
Run ruff --fix on changed Python files after apply. |
True
|
lint_diff
|
bool
|
Surface per-file diffs of post-lint mutations. |
True
|
lint_diff_max_ratio
|
float
|
Fallback threshold (diff / file size). |
0.5
|
Returns:
| Type | Description |
|---|---|
ToolResult
|
ToolResult with applied counts and checkpoint SHA. |