Edit a draft's file
edit_fileReplace the exact text old by new in a draft's file, or lines first_line to last_line, given with first_text and last_text, their whole text as read_file gave it.
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": {
"app": "<app>",
"path": "<path>",
"new": "<new>"
},
"name": "edit_file"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| app | Yes | The app, as list_apps names it, such as sam/budget. | |
| new | Yes | Empty removes `old` or the lines. | |
| old | No | ||
| path | Yes | ||
| size | No | The file's size in bytes, from read_file. | |
| last_line | No | ||
| last_text | No | ||
| first_line | No | ||
| first_text | No | ||
| replace_all | No |