multi_edit
Apply multiple exact-text replacements to one remote file in order, all or none. Use it to update several spots in a single call instead of editing each occurrence separately.
Instructions
Apply several exact-text replacements to one remote file in order; all or none are applied. On a guarded fleet you must first ask the user and get their explicit agreement; only then set confirm to the fleet name.
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>",
"edits": "<edits>"
},
"name": "multi_edit"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| path | Yes | File path on the remote machine: absolute, or relative to the workspace directory. | |
| edits | Yes | Replacements applied in order, all or none. | |
| fleet | No | Fleet name. Omit to use the default. | |
| confirm | No | Guarded fleets only: the fleet name, set only after the user explicitly agreed. Never set it on your own. | |
| context | No | Context name. Omit to use the default. | |
| workspace | No | Workspace id. Omit to use this session's workspace on the fleet. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| kind | Yes | ||
| mime | No | ||
| note | No | ||
| path | No | ||
| size | No | ||
| count | No | ||
| lines | No | ||
| where | Yes | ||
| sha256 | No | ||
| content | No | ||
| entries | No | ||
| new_file | No | ||
| warnings | No | ||
| truncated | No | ||
| workspace | Yes | ||
| next_offset | No | ||
| total_lines | No | ||
| omitted_bytes | No | ||
| written_bytes | No |