Edit file
code_editChange part of a text file: replace one exact string, leaving the rest as it is. oldString must occur exactly once unless replaceAll is set. Returns the change and the tree's problems after 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": {
"path": "<path>",
"oldString": "<oldString>",
"newString": "<newString>",
"org": "<org>"
},
"name": "code_edit"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| org | Yes | slug of the organization whose trees and sites to use. Required on every call, even when only one organization is listed; a path never names it. | |
| path | Yes | The file's address, <tree>:<path>. | |
| message | No | A brief note on the change. | |
| newString | Yes | The text to put in its place. | |
| oldString | Yes | The exact text to replace, copied from the file as read. | |
| ifRevision | No | The revisionId returned by code_read; refuse unless the file is still at it. | |
| replaceAll | No | Replace every occurrence. |