Skip to main content
Glama

opencode_tui_execute_command

Destructive

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')

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
commandYesCommand to execute (e.g. '/init')
directoryNoAbsolute path to the project directory. When provided, the request targets that project. If omitted, the OpenCode server uses its own working directory.

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
dataNo
textYes
isErrorYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv3.0.0

TDQS

A3.6/5.0
Behavior3/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

Annotations already signal destructiveHint and openWorldHint, and the description does not contradict them. However, the description adds no new behavioral context—it simply restates the action without mentioning potential side effects, permission requirements, or impact on the TUI session. Given the annotations carry the safety profile, a 3 is appropriate for the minimal additional value.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is a single short sentence with immediate action verb and examples. It is front-loaded and contains no filler, though it could be slightly more informative about parameter behavior without becoming verbose.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness3/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

The tool has a simple interface with an output schema and fully described parameters, so the description covers basic invocation needs. However, it lacks context for selecting this tool over similar siblings (e.g., opencode_command_execute) and does not explain what 'through the TUI' means operationally. Given the low complexity, it is adequate but not complete.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 100%, so both parameters are already documented. The description adds nothing beyond example command values, and does not clarify the directory parameter or command syntax further. Baseline 3 is correct as the schema does the heavy lifting.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description states a specific verb and resource: 'Execute a slash command through the TUI' with concrete examples ('/init', '/undo'). This clearly differentiates from sibling tools like opencode_command_execute and opencode_shell_execute by explicitly scoping to TUI slash commands, so an agent can recognize the tool's purpose at a glance.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines3/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description implies usage for TUI slash commands but provides no explicit guidance on when to prefer this over alternatives like opencode_command_execute or when not to use it. There is no mention of preconditions, session requirements, or excluded contexts, leaving the agent to infer the boundary.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Deploy Server

Other Tools