Edit file
file_editReplace a specific text block that appears exactly once in a workspace file, enabling precise edits without unintended changes.
Instructions
Replace an exact text block that appears exactly once in a workspace file.
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": {
"workspaceId": "<workspaceId>",
"path": "<path>",
"oldText": "<oldText>",
"newText": "<newText>"
},
"name": "file_edit"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| workspaceId | Yes | ||
| path | Yes | ||
| oldText | Yes | ||
| newText | Yes |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| path | Yes | ||
| replacements | Yes |