Skip to main content
Glama
choruzo
by choruzo

Delegate task to OpenCode agent

delegate_task

Send a software-engineering task to an OpenCode agent in your workspace; it explores your repo, honors optional edit/shell permissions, and returns summary, findings, and changed files.

Instructions

Delegate a software-engineering task to an OpenCode agent (DeepSeek by default) that runs in the same workspace. The agent explores the repository itself and returns a concise summary plus structured findings. Every agent can be granted or denied edits and shell access per call with allow_edits / allow_bash; grants still enforce the bridge security policy (sensitive-file protection for edits, no git history changes for shell). Returns { status, session_id, summary, findings, files_changed }.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
cwdNoWorkspace directory. Defaults to CLAUDE_PROJECT_DIR / the server working directory.
taskYesThe task to delegate, written as a clear instruction.
agentNoAgent to use (default: researcher). See list_agents.
modelNoOverride the model as "provider/model" (default: the agent or user default).
pathsNoStarting path hints relative to the workspace. Hints only, not a restriction.
timeoutNoExecution timeout in milliseconds (default from bridge config).
allow_bashNoGrant (true) or revoke (false) shell commands for this call. Omit to use the agent's default.
allow_editsNoGrant (true) or revoke (false) file edits for this call. Omit to use the agent's default.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv2.0.0-alpha.1

TDQS

A4.3/5.0
Behavior5/5

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

The only annotation is openWorldHint=true, so the description carries the burden and does so well: it discloses the security policy that still applies to grants (sensitive-file protection for edits, no git history changes for shell), that grants are per call, and what the agent returns. This is behavioral context the annotations cannot supply.

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?

Three sentences, front-loaded with the core action and the return contract, with no filler. Dense but each clause earns its place; the security caveat could be tightened slightly.

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 an 8-parameter tool with no output schema, the description supplies the return keys and the permission model well. It omits how the returned session_id relates to the sibling tools (e.g. whether the session can be continued via send_message), which is a meaningful gap given the sibling set.

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 the baseline is 3, but the description adds real meaning beyond the schema by explaining that allow_edits/allow_bash are per-call grants that remain subordinate to the bridge security policy, and that paths are hints not restrictions.

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?

States a specific verb and resource ('Delegate a software-engineering task to an OpenCode agent') and describes the execution model (runs in the same workspace, explores the repository itself). Clearly distinguishable from the session-management siblings like create_session and send_message.

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?

Implies when to use it (offload a self-contained engineering task to a sub-agent) and notes per-call permission grants, but never names an alternative or a when-not condition. With siblings like send_message and get_diff available, the agent must infer that this is for new delegated work rather than continuing an existing session.

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