⌨️Edit Tool
Also known as Edit, Claude Code Edit tool, old_string new_string
The tool that swaps one exact piece of text in a file.
Think of it like
It is like rubbing out one word and writing a new one.
Example
Jack asks Claude to rename one setting. Claude uses Edit to swap that one line, and the rest of the file stays as it was.
Why it matters
Small, exact changes are easy to review and hard to get wrong.
Definition
Example code
json
{"permissions": {"allow": ["Edit(./src/**)"]}}Common mistake
Key takeaways
- 1Old text, new text. An exact swap.
- 2Must be unique. Or replace all.
- 3No guessing. No patterns.