opencode_command_execute
Execute slash commands like init, undo, or redo in an existing session to manage and control OpenCode workflow.
Instructions
Execute a slash command in a session (e.g. /init, /undo, /redo)
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| agent | No | Agent to use | |
| command | Yes | The slash command to execute (e.g. 'init', 'undo') | |
| modelID | No | Model ID | |
| variant | No | Model variant | |
| arguments | No | Arguments for the command | |
| 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 |