description.md

 1This is a tool for editing files. For moving or renaming files, you should generally use the `terminal` tool with the 'mv' command instead. For larger edits, use the `create_file` tool to overwrite files.
 2
 3Before using this tool:
 4
 51. Use the `read_file` tool to understand the file's contents and context
 6
 72. Verify the directory path is correct (only applicable when creating new files):
 8   - Use the `list_directory` tool to verify the parent directory exists and is the correct location
 9
10To make a file edit, provide the following:
111. path: The full path to the file you wish to modify in the project. This path must include the root directory in the project.
122. old_string: The text to replace (must be unique within the file, and must match the file contents exactly, including all whitespace and indentation)
133. new_string: The edited text, which will replace the old_string in the file.
14
15The tool will replace ONE occurrence of old_string with new_string in the specified file.
16
17CRITICAL REQUIREMENTS FOR USING THIS TOOL:
18
191. UNIQUENESS: The old_string MUST uniquely identify the specific instance you want to change. This means:
20   - Include AT LEAST 3-5 lines of context BEFORE the change point
21   - Include AT LEAST 3-5 lines of context AFTER the change point
22   - Include all whitespace, indentation, and surrounding code exactly as it appears in the file
23
242. SINGLE INSTANCE: This tool can only change ONE instance at a time. If you need to change multiple instances:
25   - Make separate calls to this tool for each instance
26   - Each call must uniquely identify its specific instance using extensive context
27
283. VERIFICATION: Before using this tool:
29   - Check how many instances of the target text exist in the file
30   - If multiple instances exist, gather enough context to uniquely identify each one
31   - Plan separate tool calls for each instance
32
33WARNING: If you do not follow these requirements:
34   - The tool will fail if old_string matches multiple locations
35   - The tool will fail if old_string doesn't match exactly (including whitespace)
36   - You may change the wrong instance if you don't include enough context
37
38When making edits:
39   - Ensure the edit results in idiomatic, correct code
40   - Do not leave the code in a broken state
41   - Always use fully-qualified project paths (starting with the name of one of the project's root directories)
42
43If you want to create a new file, use the `create_file` tool instead of this tool. Don't pass an empty `old_string`.
44
45Remember: when making multiple file edits in a row to the same file, you should prefer to send all edits in a single message with multiple calls to this tool, rather than multiple messages with a single call each.