Skip to main content
Glama
mryesiller

opencode-delegate-mcp

by mryesiller

Delegate a coding task to a cheaper model

delegate_task
Destructive

Delegate repetitive coding tasks like boilerplate, refactors, and tests to a cheaper subagent, keeping the primary model focused on architecture and critical decisions.

Instructions

Hand off self-contained, high-volume "grunt work" to a cheaper model running through OpenCode, so the primary agent can stay focused on architecture and critical decisions.

The subagent runs non-interactively in a real working directory and CAN read, write, and edit files and run shell commands there (auto-approved by default). Give it a complete, self-contained brief — it does not see your conversation.

Good for: writing repetitive/boilerplate code, mechanical refactors, generating tests, fixing lint/type errors, updating call sites, docstrings, simple migrations. Avoid for: architecture, security-sensitive logic, ambiguous specs, or anything where a wrong edit is costly.

Args:

  • task (string, required — alias: scope, accepted for parity with delegate_tests; provide one): Complete instructions for the subagent, including acceptance criteria.

  • directory (string): Absolute path of the repo/dir to work in. Defaults to the server's cwd or config.default_directory.

  • model (string): Override provider/model, e.g. "minimax-coding-plan/MiniMax-M2.5-highspeed". Defaults to config.default_model.

  • agent (string): OpenCode agent name to run as.

  • variant (string): Reasoning-effort variant, e.g. "high" | "minimal".

  • profile (string): Named preset from config (model/agent/variant/auto_approve).

  • files (string[]): Paths to attach as context.

  • session (string): Session id to continue a prior delegation (returned as session_id).

  • continue_session (boolean): Continue the last session instead of a specific id.

  • auto_approve (boolean): Auto-approve tool permissions (default from config, usually true).

  • response_format ('markdown' | 'json'): Output format (default 'markdown').

See also: delegate_tests — same shape, dedicated to test-writing; its required field is named scope instead of task.

Returns structured content: { ok, model, session_id, directory, result, error?, usage{tokens,cost}, actions[], duration_ms }.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
taskNoComplete, self-contained instructions for the subagent. Required unless `scope` is given instead.
agentNoOpenCode agent name
filesNoFile paths to attach as context
modelNoprovider/model override (see list_models)
scopeNoAlias for `task` (delegate_tests uses this name) — provide one or the other
profileNoNamed config profile to apply
sessionNoSession id to continue
variantNoReasoning-effort variant
directoryNoAbsolute working directory for the subagent
auto_approveNoAuto-approve tool permissions
response_formatNoOutput formatmarkdown
continue_sessionNoContinue the last session
Behavior5/5

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

Annotations indicate destructive hint true and readOnly false. The description adds significant context: subagent can read/write/edit files, run shell commands, auto-approve by default, does not see conversation, and returns structured content. This exceeds annotation info without contradiction.

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 description is well-structured with clear sections, front-loaded with key information. Every sentence adds value, despite length being appropriate for 12 parameters.

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 12 parameters, no output schema (but return structure described), and complexity of delegation, the description covers purpose, usage, behavior, and sibling differentiation comprehensively.

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% (baseline 3). The description adds usage context to key parameters (e.g., 'task/scope alias for parity with delegate_tests', directory default, model override, etc.), enhancing understanding beyond schema descriptions.

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 delegates a coding task to a cheaper model, specifying the verb 'delegate' and resource 'coding task'. It differentiates from sibling tool 'delegate_tests' by noting the alias 'scope' and that 'delegate_tests' is for test-writing.

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?

The description provides explicit 'Good for' and 'Avoid for' sections, guiding when to use the tool. It mentions the subagent is auto-approved and runs non-interactively, and suggests 'delegate_tests' as an alternative for test-writing.

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/mryesiller/opencode-delegate-mcp'

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