Exact-string replacement in a file.
Mirrors the semantics of Claude Code's Edit tool:
old_stringmust appear in the file.- Unless
replace_allistrue,old_stringmust be unique. - If unique, exactly one occurrence is replaced by
new_string.
This is intentionally strict. An agent that passes ambiguous old_string
should be told to add surrounding context until it's unique — never silently
replace the first match.