Skip to main content
Glama

opencode_agent_delegate

Destructive

Delegate tasks to specialized agents like plan for analysis without changes, explore for codebase exploration, or custom agents for specific workflows.

Instructions

Delegate a task to a specific agent. Use to invoke specialized agents like "plan" for analysis without changes, "explore" for fast codebase exploration, or custom agents for specific workflows.

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": {
      "agent": "<agent>",
      "prompt": "<prompt>"
    },
    "name": "opencode_agent_delegate"
  }
}

Input Schema

NameRequiredDescriptionDefault
agentYesAgent name to invoke (e.g., build, plan, explore, or custom agent)
modelNoModel in format provider/model
promptYesTask for the agent
sessionIdNoSession ID (creates new if not provided)

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.3.0

TDQS

B3.4/5.0
Behavior3/5

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

Annotations declare destructiveHint=true, openWorldHint=true and idempotentHint=false, so the risk profile is already surfaced. The description adds a little by contrasting 'plan for analysis without changes' against other agents, implying delegated work can mutate state, but it never says what gets modified, whether the call blocks until completion, or what permissions are needed for a destructive open-world operation.

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?

Two front-loaded sentences with no filler; the core action comes first and the agent-type examples follow as supporting detail. Nothing is redundant or padded.

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?

For a destructive, open-world tool with no output schema and four parameters, the description covers intent and agent choice but is silent on execution behavior (blocking vs async, return shape, session creation when sessionId is omitted). It is adequate to select the tool but thin for invoking it confidently.

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% and every parameter already carries its own description (agent, model format provider/model, prompt, sessionId). The description's agent examples ('plan', 'explore', custom) largely repeat the schema's example list and add nothing about model or sessionId semantics, so it sits at the baseline.

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 ('Delegate') and resource ('a task to a specific agent'), and enumerates agent archetypes (plan, explore, custom) so the agent understands the delegation model. It does not explicitly distinguish itself from siblings like opencode_run or opencode_session_prompt, which keeps it from a 5.

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 gives useful when-to-use cues by explaining what 'plan' and 'explore' agents are for ('analysis without changes', 'fast codebase exploration'), which supports agent selection. However, it offers no when-not guidance, no mention of prerequisites, and no routing against the closest sibling (opencode_run) or opencode_session_prompt.

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