Home Explore Blog CI



zed

crates/assistant_tools/src/edit_file_tool/description.md
3e074e7194abf7878553ec608aee02d832325ed79f11107d00000003000001cb
This is a tool for creating a new file or editing an existing file. For moving or renaming files, you should generally use the `terminal` tool with the 'mv' command instead.

Before using this tool:

1. Use the `read_file` tool to understand the file's contents and context

2. Verify the directory path is correct (only applicable when creating new files):
   - Use the `list_directory` tool to verify the parent directory exists and is the correct location

Chunks
0f0dc7d4 (1st chunk of `crates/assistant_tools/src/edit_file_tool/description.md`)
Title: File Tool Instructions
Summary
This section describes the proper usage of the file tool, emphasizing its role in creating or editing files. It advises against using it for moving or renaming (suggesting the `terminal` tool with 'mv' command instead). It also highlights the importance of using `read_file` to understand file content and context before editing, and `list_directory` to verify the directory path before creating a new file.