opencode_run
Execute software engineering tasks via an AI coding agent for feature implementation, refactoring, debugging, and code explanation; attach files for context.
Instructions
Execute a coding task through OpenCode AI agent. Use for implementing features, refactoring, debugging, explaining code, or any software engineering task.
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": {
"prompt": "<prompt>"
},
"name": "opencode_run"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| agent | No | Agent to use: build, plan, or custom agent name | |
| files | No | File paths to attach as context | |
| model | No | Model in format provider/model (e.g., anthropic/claude-sonnet-4) | |
| prompt | Yes | The task or question for OpenCode | |
| noReply | No | Add context without triggering AI response | |
| workingDirectory | No | Project directory path (auto-detected if not specified) |