Edit
editReplace an exact text match in a file once or globally while preserving encoding and newline style, then return a unified diff to verify the change.
Instructions
Replace exact text in a file. oldString must match exactly once unless replaceAll=true. The file's encoding and newline style are preserved. Returns a unified diff.
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>"
},
"name": "edit"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| path | Yes | ||
| newString | Yes | ||
| oldString | Yes | ||
| replaceAll | No |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| result | Yes |