update_file
Update an existing file by either replacing specific text or overwriting its entire content.
Instructions
Update part or all of an existing file.
Use EITHER (find, replace) for a literal text substitution, OR new_content for a full rewrite -- do not pass both.
Args:
path: Path relative to the workspace root. Must already exist.
find: Literal text to search for (mutually exclusive with new_content).
replace: Replacement text for every match of find (default: "").
new_content: Full replacement content for the file.
count: Max number of find occurrences to replace (-1 = all).
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| find | No | ||
| path | Yes | ||
| count | No | ||
| replace | No | ||
| new_content | No |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||