Skip to main content
Glama

Hand a coding task to opencode

opencode_dispatch

Dispatches a self-contained coding task to a temporary opencode session and immediately returns a runId for checking results with wait.

Instructions

Creates a temporary opencode session and hands it the task. Returns IMMEDIATELY with a runId, without waiting for the result. Afterwards call 'opencode_wait' with the runId until the run is finished. The task must be described completely and self-contained, because the session knows nothing about this conversation.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
taskYesComplete, self-contained task description including context, files and acceptance criteria.
agentNoopencode agent for this run only.
modelNoIGNORED — this installation pins model to the opencode default. Anything passed here is discarded, the run proceeds with the pinned value. Do not try to work around this.
titleNoTitle of the temporary session.
systemNoExtra system instruction for this run.
directoryNoProject directory opencode should work in. Default: the configured directory.
keepSessionNoDo not delete the session after the run.
permissionModeNoPermission mode for this run only. May only be STRICTER than the configured "auto" — a looser value is discarded.
Behavior5/5

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

With no annotations provided, the description fully discloses the asynchronous nature: 'Returns IMMEDIATELY with a runId, without waiting for the result.' It also warns that the session knows nothing about the conversation, which tells the agent to include all context.

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

Conciseness5/5

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

The entire description is two sentences, front-loaded with the core purpose, and packs critical workflow instructions without verbose filler.

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

Completeness5/5

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

For an asynchronous dispatch tool with 8 parameters and no output schema, the description covers the essential workflow: create, get runId, call wait. It also explains the session isolation, giving the agent everything needed to invoke it correctly.

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 coverage is 100%, with detailed descriptions for all 8 parameters including the model ignoring note. The description adds no additional parameter-specific meaning beyond the schema, so a baseline score of 3 is appropriate.

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 clearly states it 'Creates a temporary opencode session and hands it the task', specifying the verb and resource. It also distinguishes itself from siblings by explicitly noting the immediate return of a runId and the need to call opencode_wait later.

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

Usage Guidelines5/5

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

It explicitly provides the follow-up action: 'Afterwards call 'opencode_wait' with the runId until the run is finished.' It also explains the key constraint that the task must be self-contained, which is essential for using a stateless session.

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

Install Server

Other Tools

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/teodorgross/opencode-mcp-bridge'

If you have feedback or need assistance with the MCP directory API, please join our Discord server