Skip to main content
Glama
Antigravity OpenCode Delegate

Antigravity OpenCode Delegate

opencode_start

Starts an OpenCode task in the background and returns a job ID so you can poll status instead of blocking; avoid launching a duplicate task while the job is running.

Instructions

Start an OpenCode task in the background and immediately return a job ID. Poll opencode_status; do not start a duplicate task while the job is running.

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": {
      "task": "<task>",
      "cwd": "<cwd>",
      "model": "<model>"
    },
    "name": "opencode_start"
  }
}

Input Schema

NameRequiredDescriptionDefault
cwdYesExisting absolute project directory.
taskYesTask, scope and expected output. Start with ordinary text, not a CLI option.
agentNoOptional OpenCode agent in write mode. Read-only mode always uses an isolated reader agent.
modelYesREQUIRED for each delegation: configured provider/model, optionally #variant. Use an explicitly authorized ID; ask or call opencode_models if unspecified. No automatic model selection or fallback.
readOnlyNoAllow file reading/search only. Denies edit, shell, external directories and network tools.
sessionIdNoUnsupported: omit this field. Old sessions can override the selected project and current permissions.
timeoutMsNoOpenCode process timeout, independent of the MCP request timeout.
standaloneNoStart a private OpenCode server. Required in read-only mode.
autoApproveNoApprove tools that are not explicitly denied. Enable only for tasks whose tool actions are authorized.
continueSessionNoMust remain false. This bridge creates a new session for each task.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.5.0

TDQS

A3.8/5.0
Behavior3/5

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

No annotations are supplied, so the description carries the burden, and it does disclose the key behavioral facts: execution is backgrounded, the call returns immediately with a job ID, and concurrent duplicates are disallowed. It does not describe side effects, permission requirements, or failure modes (e.g., what happens on timeout or invalid model), which matter for a task-spawning tool. Much behavioral detail lives in the schema field descriptions rather than the tool description.

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?

Two short sentences with zero filler, and the async return behavior is front-loaded before the polling instruction. Every clause carries actionable information.

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

Completeness4/5

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

For a 10-parameter async dispatch tool with no output schema, the description supplies the essential contract: background execution, immediate job ID, and the polling follow-up. Missing pieces are the model-required precondition (documented only in schema) and the distinction from opencode_execute, but nothing critical to correct invocation is absent.

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 every one of the 10 parameters is already documented in the schema, including several 'must remain false'/'unsupported' fields. The description adds no parameter-level meaning beyond that, which is acceptable given the schema does the heavy lifting, but it earns no extra credit.

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

Purpose4/5

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

States a specific verb and resource ('Start an OpenCode task') plus a defining behavioral trait: it runs in the background and returns a job ID immediately. It also implicitly distinguishes itself from the polling sibling opencode_status. It does not contrast itself with opencode_execute, which is presumably the foreground alternative, so sibling differentiation is only partial.

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

Usage Guidelines4/5

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

Gives concrete operational guidance: poll opencode_status after starting and never start a duplicate task while a job is running. That is real when/when-not guidance for the async flow. It stops short of stating when to choose this over opencode_execute or opencode_cancel, leaving the main sibling-selection decision to inference.

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