Skip to main content
Glama

worker_delegate

Delegate bounded coding, refactoring, or debugging tasks to a CLI worker; run synchronously up to a set wait limit and automatically continue as a background job if still running.

Instructions

Delegate a bounded coding, refactoring, or debugging task to a CLI worker (default: codex). Runs synchronously up to wait_seconds (default 35s) and seamlessly defers to a background job if still 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>"
    },
    "name": "worker_delegate"
  }
}

Input Schema

NameRequiredDescriptionDefault
cwdYesTarget repository or working directory path.
taskYesClear, self-contained work order for the worker.
modelNoOptional model override.
workerNoWorker driver name (default: 'codex').
extra_argsNoOptional pass-through CLI flags appended to the worker command.
wait_secondsNoMax seconds to wait before returning a running job_id (default 35, max 55).
permission_modeNoPermission preset: 'inherit' (default, respects ~/.codex/config.toml), 'read-only', or 'bypass'.
timeout_secondsNoHard execution timeout in seconds (default 900).
allow_concurrentNoOverride the per-cwd write lock if another write job is already active.
max_rework_roundsNoCircuit-breaker limit for subsequent followup rework rounds (default 3).

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.2.0

TDQS

A3.5/5.0
Behavior3/5

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

With no annotations, the description carries the full behavioral burden; it does well to disclose the synchronous-then-background deferral behavior and the wait_seconds window. However, it omits key operational facts such as the per-cwd write lock (surfaced only via the allow_concurrent parameter), permission-mode implications, and what a caller receives when the job defers.

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 tightly written sentences with no wasted words. The core synchronous/deferred behavior is front-loaded and easy to scan.

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 ten-parameter tool with no annotations and no output schema, the description covers the central execution model but leaves gaps around return values (e.g., job_id), failure semantics, and permission-mode consequences. It is adequate but not fully complete for the tool's complexity.

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 the schema already documents all ten parameters thoroughly. The description's mentions of 'default: codex' and 'wait_seconds (default 35s)' largely restate what the schema already provides, so it adds little semantic value beyond the structured fields.

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?

The description uses a specific verb ('Delegate') and names the resource and task domain ('bounded coding, refactoring, or debugging task to a CLI worker'), so the tool's role as the dispatch entry point is clear. It does not explicitly contrast itself with siblings like worker_followup or worker_review, leaving that differentiation to inference.

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 phrase 'bounded coding, refactoring, or debugging task' implies the intended use case, but there is no explicit statement about when to use this instead of worker_followup (for continuing existing work) or worker_review. Usage guidance is present but only implicit.

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