file-edit
tool-definition · v1.0.0
Targeted string replacement in a file. Requires a prior read of the same file.
Tool signature
function file_edit(path: string, old_string: string, new_string: string, replace_all: boolean?) → object Replace exact string with new string in a file.
Parameters
path(string, required) — File pathold_string(string, required) — Exact existing stringnew_string(string, required) — Replacementreplace_all(boolean) — Replace every occurrence
Side effects
fs-write