1Makes multiple edits to a single file in one operation. Built on Edit tool for efficient multiple find-and-replace operations. Prefer over Edit tool for multiple edits to same file.
 2
 3<prerequisites>
 41. Use View tool to understand file contents and context
 52. Verify directory path is correct
 6</prerequisites>
 7
 8<parameters>
 91. file_path: Absolute path to file (required)
102. edits: Array of edit operations, each containing:
11   - old_string: Text to replace (must match exactly including whitespace/indentation)
12   - new_string: Replacement text
13   - replace_all: Replace all occurrences (optional, defaults to false)
14</parameters>
15
16<operation>
17- Edits applied sequentially in provided order
18- Each edit operates on result of previous edit
19- All edits must be valid for operation to succeed - if any fails, none applied
20- Ideal for several changes to different parts of same file
21</operation>
22
23<critical_requirements>
24
251. All edits follow same requirements as single Edit tool
262. Edits are atomic - either all succeed or none applied
273. Plan edits carefully to avoid conflicts between sequential operations
28   </critical_requirements>
29
30<warnings>
31- Tool fails if old_string doesn't match file contents exactly (including whitespace)
32- Tool fails if old_string and new_string are identical
33- Earlier edits may affect text that later edits try to find - plan sequence carefully
34</warnings>
35
36<best_practices>
37
38- Ensure all edits result in correct, idiomatic code
39- Don't leave code in broken state
40- Use absolute file paths (starting with /)
41- Use replace_all for renaming variables across file
42- Avoid adding emojis unless user explicitly requests
43  </best_practices>
44
45<new_file_creation>
46
47- Provide new file path (including directory if needed)
48- First edit: empty old_string, new file contents as new_string
49- Subsequent edits: normal edit operations on created content
50  </new_file_creation>