opencode_shell_execute
Run shell commands in an OpenCode session to delegate coding tasks, debugging, and refactoring across projects.
Instructions
Run a shell command through the opencode session
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": {
"sessionId": "<sessionId>",
"command": "<command>",
"agent": "<agent>"
},
"name": "opencode_shell_execute"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| agent | Yes | Agent to use for the shell command | |
| command | Yes | Shell command to execute | |
| modelID | No | Model ID | |
| directory | No | Absolute path to the project directory. When provided, the request targets that project. If omitted, the OpenCode server uses its own working directory. | |
| sessionId | Yes | Session ID | |
| providerID | No | Provider ID |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| data | No | ||
| text | Yes | ||
| isError | Yes |