edit_code
Edit an existing file using a natural-language instruction; delegates to OpenCode for lint and typecheck safety.
Instructions
Edit an existing file using OpenCode. Delegates all edits to OpenCode for lint/typecheck safety.
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": {
"file": "<file>",
"instruction": "<instruction>"
},
"name": "edit_code"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| file | Yes | Relative file path to edit | |
| project | No | Project name | |
| instruction | Yes | Natural-language edit instruction |