edit_blocks
Update code across multiple files by applying search-replace edits in one batch. Supports flexible whitespace, escape characters, and error handling policies like rollback.
Instructions
Apply multiple search/replace edits in a single call.
Args: edits: List of edit specs, each with: - file_path: Absolute path - old_string: Text to find - new_string: Replacement text - expected_replacements: Match count (default 1) - ignore_whitespace: Flexible whitespace (default False) - normalize_escapes: Unescape \n, \t (default False) error_policy: "fail-fast" | "continue" | "rollback" encoding: File encoding for all edits (utf-8, gbk, gb2312).
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| edits | Yes | ||
| error_policy | No | fail-fast | |
| encoding | No | utf-8 |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||