Edit part of a file
edit_fileReplaces old_text with new_text in a file. old_text must match exactly once (include a little surrounding text to make it unique), unless replace_all is true. The change appears live in Manulyx for anyone with the file open. If tracking of your edits is on for this project (the default, or the owner requires tracking), it is recorded as a tracked change under the person's name and yours that can be accepted or rejected; otherwise it is applied directly and kept in History.
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"project_id": "<project_id>",
"path": "<path>",
"old_text": "<old_text>",
"new_text": "<new_text>"
},
"name": "edit_file"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| path | Yes | ||
| new_text | Yes | The replacement (may be empty to delete the passage). | |
| old_text | Yes | Exact text to replace, as it is in the file now. | |
| project_id | Yes | The project's id, from list_projects. | |
| replace_all | No | Replace every occurrence instead of requiring exactly one. |