Show what a run changed
opencode_diffRetrieve the actual per-file patch for an opencode run via runId, revealing exact code changes rather than file names alone. Works within git repositories.
Instructions
Returns the actual patch per file for a run, not just the file names. Relies on opencode's workspace snapshots, so it is empty outside a git repository — opencode_result still lists the touched files in that case.
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": {
"runId": "<runId>"
},
"name": "opencode_diff"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| file | No | Only this file's patch. | |
| runId | Yes | The runId of the run. | |
| maxChars | No | Truncate each patch (default 4000). |