opencode_tui_execute_command
Execute slash commands like /init or /undo through the TUI to control OpenCode sessions.
Instructions
Execute a slash command through the TUI (e.g. '/init', '/undo')
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": {
"command": "<command>"
},
"name": "opencode_tui_execute_command"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| command | Yes | Command to execute (e.g. '/init') | |
| 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. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| data | No | ||
| text | Yes | ||
| isError | Yes |