Skip to main content
Glama

Delegate to OpenCode

ode_delegate

Start a background OpenCode agent session to execute a given task prompt, returning a sessionId for later follow-up or resumption.

Instructions

Starts a new OpenCode agent session to work on prompt (or promptPath) in the background and returns a sessionId - typically with status "running" once the underlying opencode server is warm, or "starting" if it just had to cold-spawn (never blocks past a few seconds either way, unless waitMs is set). Pass sessionId to resume a finished session with a follow-up prompt. Follow up with ode_await (block until done or timeout; timeoutMs: 0 = single check).

Model policy (cost-first):

  • default (when model omitted): opencode/deepseek-v4-flash-free

  • ODE_MODELS force-routing catalog: opencode/deepseek-v4-flash-free, opencode/nemotron-3-ultra-free, opencode/mimo-v2.5-free, opencode/laguna-s-2.1-free, … (13 total)

  • allow list: openrouter/, opencode/ (default)

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
cwdNoWorking directory for the delegated session. Omit to use the server's own cwd.
agentNoOpenCode agent/mode name to run as. Omit for opencode's own default. Ignored when resuming.
modelNoModel as "provider/model", e.g. "opencode/deepseek-v4-flash-free". Omit to use OPEN_DELEGATE_DEFAULT_MODEL or the OpenCode server default. Ignored when resuming via sessionId.
titleNoOptional short title for the session (shown in opencode's own session list). Ignored when resuming.
promptNoThe task/instructions to hand off (inline). Mutually exclusive with promptPath; one is required. Hard cap ~512KiB — use promptPath for anything larger. When sessionId is set, this is the follow-up prompt.
waitMsNoAfter setup succeeds, block up to this many ms for the session to finish (clamped 0-60000). Omitting skips the wait (same as waitMs: 0). Useful for short tasks that can finish in one tool call.
sessionIdNoResume an existing terminal session with a follow-up prompt instead of creating a new one. Session must not be running/starting.
promptPathNoAbsolute path to a UTF-8 text file containing the prompt, for anything too large to inline safely (~512KiB cap applies to the file too). Mutually exclusive with prompt.
Behavior5/5

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

Describes typical status ('running' or 'starting'), cold-spawn behavior, non-blocking nature unless waitMs set, model routing policy, and cost-first default. No annotations provided, so description fully carries behavioral disclosure.

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?

Description is well-structured with sections, but slightly verbose. Each part adds value, but could be slightly more concise. Front-loaded with main action and return value.

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?

Given 8 parameters, no output schema, and no annotations, the description covers usage, behavior, model policy, and parameter constraints thoroughly. Includes return value and session lifecycle, making it complete for an agent to use correctly.

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

Parameters4/5

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

Schema coverage is 100%, so baseline is 3. Description adds significant context beyond schema: mutual exclusivity of prompt and promptPath, 512KiB cap, waitMs clamping, resume conditions, and model format guidance.

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 the tool starts a new OpenCode agent session to work on a prompt and returns a sessionId, with specific verb 'Starts' and resource 'OpenCode agent session'. It distinguishes from siblings by mentioning follow-up with ode_await and the session lifecycle.

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?

Provides explicit guidance on when to use (delegating a task), when to omit (resume with sessionId), and alternatives (ode_await for blocking). Covers mutual exclusivity of prompt/promptPath, model selection, and cost policy.

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/Verbalize-public/open-delegate'

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