Skip to main content
Glama

codex_dispatch

Dispatch implementation specs to a local Codex CLI as async background tasks, then wait for automatic wakeup instead of polling status.

Instructions

Dispatch a detailed implementation specification to local Codex CLI running non-interactively with the configured Codex Castor permission policy (full access by default). Configured as an async background tool: after calling it, do NOT poll codex_status; either work on something else or stop your turn and wait for automatic wakeup.

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": {
      "workdir": "<workdir>"
    },
    "name": "codex_dispatch"
  }
}

Input Schema

NameRequiredDescriptionDefault
specNoComplete, self-contained Markdown task specification for Codex. Provide either spec or spec_file.
modelNoOptional Codex model override (omit to use default in ~/.codex/config.toml).
titleNoOptional concise human-readable title for this task.
task_idNoOptional short unique slug (e.g. 'feat-auth-jwt'). Auto-generated if omitted.
workdirYesAbsolute path to the target project/working directory.
base_refNoGit ref to branch from when use_worktree=true (default: HEAD).HEAD
fast_modeNoOptional override to enable or disable Codex Fast mode (service_tier='fast') for this round. Omit to use the Codex Castor Fast mode setting.
spec_fileNoAbsolute path to an existing Markdown specification file. Provide either spec or spec_file.
use_worktreeNoIf true, run Codex in an isolated managed Git worktree (branch codex/<task_id>). REQUIRED when running multiple Codex tasks in parallel on the same repository.
permission_modeNoOptional override for Codex permission/approval policy for this round ('full_access', 'approve_for_me', 'workspace_write', 'read_only'). Omit to use the Codex Castor permission setting.
reasoning_effortNoOptional Codex reasoning effort override (e.g. 'medium', 'high', 'xhigh').
extra_writable_dirsNoOptional extra directories passed via --add-dir.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A3.8/5.0
Behavior4/5

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

With no annotations provided, the description carries the full behavioral burden and does well: it discloses non-interactive execution, the configured permission policy with full access by default, async background operation, the no-polling contract, and automatic wakeup. It omits return behavior and error handling, but the core operational behavior is clear.

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 the core action front-loaded and the critical async caveat immediately after. Every sentence carries useful information and there is no repetition or filler.

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 a 12-parameter dispatch tool with no output schema and no annotations, the description covers the most important operational facts: async execution, permission default, and the no-polling wakeup contract. It would be stronger with a note on what happens after dispatch or how failures surface, but the schema and sibling codex_status likely cover the remaining retrieval mechanics.

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 coverage is 100%, so parameter meanings are already fully documented in the input schema. The description adds context around the specification and permission default but does not add syntax or format details beyond what the schema provides.

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 states a specific action: dispatching an implementation specification to the local Codex CLI running non-interactively. It distinguishes the tool's execution mode (async background) and references codex_status as something not to poll, but does not explicitly contrast it with other siblings such as codex_resume.

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?

It gives a clear post-call rule: do not poll codex_status, either work elsewhere or end the turn and await automatic wakeup. However, it does not state when to choose codex_dispatch versus alternatives like codex_resume, leaving the primary use-case routing implied.

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