server_file_edit
Replace an exact, unique string in a text file to update content safely; set confirm=true to apply, with optional backup and replace-all support.
Instructions
Change part of a text file: replace old_string with new_string. Needs confirm=true.
old_string must match the file exactly and must be unique, unless replace_all=true. Works on files Claude can read. Lines with hidden secrets cannot be matched.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| host | No | ||
| path | Yes | ||
| backup | No | ||
| as_root | No | ||
| confirm | No | ||
| new_string | Yes | ||
| old_string | Yes | ||
| replace_all | No |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| result | Yes |