Replace full file rewrites or search and replace with Fast Apply in 5 minutes
1. Add an edit_file tool to your agent
edit_file
tool to your agent. Use one of the formats below.target_file
(string, required): The target file to modifyinstructions
(string, required): A single sentence written in the first person describing what you’re changing. Used to help disambiguate uncertainty in the edit.code_edit
(string, required): Specify ONLY the precise lines of code that you wish to edit. Use // ... existing code ...
for unchanged sections.instructions
field should be generated by your AI model, not user input.
Follow the tool description above nearly verbatim - terminology like “use it
to disambiguate uncertainty in the edit” should be used. Example: “I am adding
error handling to the user authentication function”Merge with Morph Fast Apply
Handle the Response