edit_file
Replace a substring in a WSL file with new text, including dry-run preview and replace-all options.
Instructions
Line/substring-based edit of a WSL file: replace oldString with newString. oldString must be unique unless replaceAll=true. Use dryRun=true to preview.
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_file"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| path | Yes | ||
| distro | No | ||
| dryRun | No | ||
| newString | Yes | ||
| oldString | Yes | ||
| replaceAll | No |