Skip to main content
Glama

dispatch_task

Delegate bounded coding tasks to cheap or local execution workers in isolated Git worktrees; automatic scope checks and quality gates return a compressed review packet to save planner tokens.

Instructions

Dispatch a bounded coding task to a cheap/local execution worker (e.g. WorkBuddy) inside an isolated Git worktree. Automatically runs Scope Guard and gate commands before returning a compressed Review Packet to save planner tokens.

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": {
      "repoPath": "<repoPath>",
      "title": "<title>",
      "prompt": "<prompt>",
      "acceptanceCriteria": "<acceptanceCriteria>"
    },
    "name": "dispatch_task"
  }
}

Input Schema

NameRequiredDescriptionDefault
asyncNoIf true, return immediately and poll via get_task_status (default: false).
modelNoOptional model override passed to the worker.
titleYesShort human-readable task title.
promptYesDetailed implementation instructions for the worker.
workerNoWorker adapter name: "workbuddy" (default if detected), "openai-api", "generic-cli", or "mock".
repoPathYesAbsolute path to the target Git repository root or subfolder.
maxRoundsNoCircuit breaker max rounds before stopping rework retries (default: 3).
timeoutMsNoPer-round timeout in milliseconds (default: 300000).
allowedPathsNoOptional glob whitelist restricting editable files (e.g. ["src/auth/**", "tests/auth/**"]). Supports "!pattern" exclusions.
gateCommandsNoOptional verification commands run automatically inside the worktree (e.g. ["npm run typecheck", "npm test"]).
autoDetectGatesNoIf true and gateCommands is omitted, auto-detect fast checks from package.json / go.mod / Cargo.toml / pytest (default: false unless enabled in .cortex-hands.json).
maxTurnsPerRoundNoMax agentic turns per worker round (default: 15).
acceptanceCriteriaYesExplicit checklist the worker and reviewer verify before merge.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.2.0

TDQS

A3.8/5.0
Behavior3/5

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

No annotations, so the description must carry the full burden. It does disclose valuable behavior: isolated worktree execution, automatic Scope Guard and gate commands, compressed Review Packet to save tokens. Gaps: no indication whether the worktree is left behind, why bounded/cheap/local matters, whether approval is required to merge (sibling approve_and_merge exists), or the failure/timeout semantics beyond the schema's timeoutMs.

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 sentences, front-loaded with purpose then automatic behaviors; no filler. Slightly dense with parenthetical jargon (WorkBuddy, Scope Guard, Review Packet) but each term carries information.

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?

A 13-parameter mutation/execution tool with no annotations or output schema deserves more: the description never says what the return value contains (presumably the Review Packet) or what happens on failure/abort. It covers the happy path well but leaves the agent to infer result shape and lifecycle.

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 baseline is 3; the description adds meaning on top by explaining how gateCommands and autoDetectGates fit the automatic verification flow and framing acceptanceCriteria as a checklist verified before merge. It doesn't elaborate on worker adapters or allowedPaths beyond the schema.

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 (dispatch) and resource (bounded coding task to a worker in an isolated Git worktree), plus what happens automatically (Scope Guard, gates, Review Packet). An agent can distinguish this from siblings like dispatch_batch or get_task_status.

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 (a bounded coding task needing isolation and verification), and the async param mentions polling via get_task_status. But there is no explicit 'use X instead when...' routing versus dispatch_batch, and no prerequisites (auth, worker availability, clean repo state) are stated.

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