Skip to main content
Glama

delegate

Destructive

Hand off implementation to OpenAI Codex while you keep planning and review. Run agent, plan, ask, or review modes and check status before trusting the result.

Instructions

Delegate a coding task to OpenAI Codex. Never run codex from the shell — use this tool. Check status before trusting result — a run that spawns then fails returns normally. Keep model, reasoningEffort and fast at their defaults unless the user asks. See the delegate skill.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
fastNoCodex Fast mode; higher credit use.
modeNoagent implements; plan returns a structured plan; ask answers; review runs native review.agent
specYesBrief with goal, scope, fixed decisions quoted exactly, and acceptance criteria; reference files instead of pasting code.
modelNoCodex model id: gpt-5.6-luna, gpt-5.6-sol, gpt-5.6-terra, gpt-5.5, gpt-5.4, gpt-5.4-mini.gpt-5.6-luna
timeoutMsNoWhole-run cap in ms (default 1h). Mid-turn silence is allowed; startup has a separate 60s first-output deadline.
webSearchNoCodex's built-in web search.
workspaceYesCodex's working directory; not confinement. Must already exist — never create one for the call.
reviewTargetNoRequired in review; forbidden otherwise: uncommitted, base branch, or commit.
resumeThreadIdNoThread to continue. Reuse its workspace. Forbidden with review.
reasoningEffortNominimal is rejected by every published model; none is accepted though the catalog omits it.xhigh

Schema Changelog

Changes observed during successful MCP inspections. Dates show when Glama detected each change.

  1. Changed1 schema field changedv2.2.1
    • changedInput schema / properties / reasoningEffort / description
      Previous value: -"gpt-5.6-* reject minimal; older models reject none."New value: +"minimal is rejected by every published model; none is accepted though the catalog omits it."
  2. Changed6 schema fields changedv2.0.0
    • changedInput schema / properties / model / default
      Previous value: -"gpt-5.6-terra"New value: +"gpt-5.6-luna"
    • changedInput schema / properties / model / description
      Previous value: -"Codex model id: gpt-5.6-terra, gpt-5.6-sol, gpt-5.6-luna, gpt-5.5, gpt-5.4, gpt-5.4-mini and more."New value: +"Codex model id: gpt-5.6-luna, gpt-5.6-sol, gpt-5.6-terra, gpt-5.5, gpt-5.4, gpt-5.4-mini."
    • changedInput schema / properties / reasoningEffort / default
      Previous value: -"high"New value: +"xhigh"
    • changedInput schema / properties / reasoningEffort / enum
      Previous value: -[
      -  "none",
      -  "minimal",
      -  "low",
      -  "medium",
      -  "high",
      -  "xhigh",
      -  "max"
      -]New value: +[
      +  "none",
      +  "minimal",
      +  "low",
      +  "medium",
      +  "high",
      +  "xhigh",
      +  "max",
      +  "ultra"
      +]
    • changedInput schema / properties / workspace / description
      Previous value: -"Codex's working directory; not confinement. Must already exist — never create one for the call. Defaults to the server cwd, often not the project root under npx/plugin. Required on resume: resume has no --cd."New value: +"Codex's working directory; not confinement. Must already exist — never create one for the call."
    • changedInput schema / required
      Previous value: -[
      -  "spec"
      -]New value: +[
      +  "spec",
      +  "workspace"
      +]
  3. Changed11 schema fields changedv1.21.1
    • changedInput schema / properties / fast / description
      Previous value: -"Codex Fast mode (service_tier=fast) — higher credit use"New value: +"Codex Fast mode; higher credit use."
    • addedInput schema / properties / mode / description
      Added value: +"agent implements; plan returns a structured plan; ask answers; review runs native review."
    • changedInput schema / properties / model / description
      Previous value: -"Codex model id"New value: +"Codex model id: gpt-5.6-terra, gpt-5.6-sol, gpt-5.6-luna, gpt-5.5, gpt-5.4, gpt-5.4-mini and more."
    • removedInput schema / properties / network
      Removed value: -{
      -  "default": true,
      -  "description": "Web search, and network from Codex's shell in agent mode. false seals the run",
      -  "type": "boolean"
      -}
    • changedInput schema / properties / reasoningEffort / description
      Previous value: -"Reasoning effort. gpt-5.6-* reject minimal; older models reject none"New value: +"gpt-5.6-* reject minimal; older models reject none."
    • changedInput schema / properties / resumeThreadId / description
      Previous value: -"Resume an existing Codex thread instead of starting a new one"New value: +"Thread to continue. Reuse its workspace. Forbidden with review."
    • changedInput schema / properties / reviewTarget / description
      Previous value: -"Required in review mode: uncommitted, base branch, or commit sha"New value: +"Required in review; forbidden otherwise: uncommitted, base branch, or commit."
    • changedInput schema / properties / spec / description
      Previous value: -"Task brief: goal, scope, decisions already made (quote the user's exact values), acceptance criteria. Point at files to read rather than pasting code."New value: +"Brief with goal, scope, fixed decisions quoted exactly, and acceptance criteria; reference files instead of pasting code."
    • changedInput schema / properties / timeoutMs / description
      Previous value: -"Hard-cap timeout in milliseconds (default 1h). A long silent command is not a timeout; only the 60s spawn-to-first-output deadline is."New value: +"Whole-run cap in ms (default 1h). Mid-turn silence is allowed; startup has a separate 60s first-output deadline."
    • addedInput schema / properties / webSearch
      Added value: +{
      +  "default": true,
      +  "description": "Codex's built-in web search.",
      +  "type": "boolean"
      +}
    • changedInput schema / properties / workspace / description
      Previous value: -"Working directory for Codex. Optional; defaults to the server process cwd, which for npx and plugin launches is not necessarily your project root — pass it explicitly. Smallest directory holding the task's files; none → project root. Must already exist — never create one for the call. Required when resuming: codex exec resume has no --cd."New value: +"Codex's working directory; not confinement. Must already exist — never create one for the call. Defaults to the server cwd, often not the project root under npx/plugin. Required on resume: resume has no --cd."
  4. Changed3 schema fields changedv1.18.1
    • changedInput schema / properties / reasoningEffort / enum
      Previous value: -[
      -  "none",
      -  "minimal",
      -  "low",
      -  "medium",
      -  "high",
      -  "xhigh"
      -]New value: +[
      +  "none",
      +  "minimal",
      +  "low",
      +  "medium",
      +  "high",
      +  "xhigh",
      +  "max"
      +]
    • changedInput schema / properties / workspace / description
      Previous value: -"Working directory for Codex (defaults to cwd)"New value: +"Working directory for Codex. Optional; defaults to the server process cwd, which for npx and plugin launches is not necessarily your project root — pass it explicitly. Smallest directory holding the task's files; none → project root. Must already exist — never create one for the call. Required when resuming: codex exec resume has no --cd."
    • changedOutput schema / (root)
      Previous value: -{
      -  "$schema": "http://json-schema.org/draft-07/schema#",
      -  "additionalProperties": true,
      -  "properties": {
      -    "cliVersion": {
      -      "type": "string"
      -    },
      -    "delegationId": {
      -      "type": "string"
      -    },
      -    "exitCode": {
      -      "type": "integer"
      -    },
      -    "filesReportedByEditTools": {
      -      "items": {
      -        "type": "string"
      -      },
      -      "type": "array"
      -    },
      -    "plan": {
      -      "additionalProperties": false,
      -      "properties": {
      -        "overview": {
      -          "type": "string"
      -        },
      -        "steps": {
      -          "items": {
      -            "additionalProperties": false,
      -            "properties": {
      -              "detail": {
      -                "type": "string"
      -              },
      -              "title": {
      -                "type": "string"
      -              }
      -            },
      -            "required": [
      -              "title",
      -              "detail"
      -            ],
      -            "type": "object"
      -          },
      -          "type": "array"
      -        }
      -      },
      -      "required": [
      -        "overview",
      -        "steps"
      -      ],
      -      "type": "object"
      -    },
      -    "reason": {
      -      "enum": [
      -        "cancelled",
      -        "startup-timeout",
      -        "hard-cap",
      -        "agent-error",
      -        "died-mid-turn",
      -        "exit-nonzero"
      -      ],
      -      "type": "string"
      -    },
      -    "result": {
      -      "type": "string"
      -    },
      -    "resultSource": {
      -      "const": "stream-fallback",
      -      "type": "string"
      -    },
      -    "resumed": {
      -      "type": "boolean"
      -    },
      -    "status": {
      -      "enum": [
      -        "completed",
      -        "failed",
      -        "interrupted"
      -      ],
      -      "type": "string"
      -    },
      -    "threadId": {
      -      "type": "string"
      -    },
      -    "usage": {
      -      "additionalProperties": false,
      -      "properties": {
      -        "cacheWriteInputTokens": {
      -          "type": "number"
      -        },
      -        "cachedInputTokens": {
      -          "type": "number"
      -        },
      -        "inputTokens": {
      -          "type": "number"
      -        },
      -        "outputTokens": {
      -          "type": "number"
      -        },
      -        "reasoningOutputTokens": {
      -          "type": "number"
      -        }
      -      },
      -      "type": "object"
      -    },
      -    "warnings": {
      -      "items": {
      -        "type": "string"
      -      },
      -      "type": "array"
      -    },
      -    "workspace": {
      -      "type": "string"
      -    }
      -  },
      -  "required": [
      -    "result",
      -    "status",
      -    "workspace"
      -  ],
      -  "type": "object"
      -}New value: +null
  5. Changed1 schema field changedv1.14.1
    • addedOutput schema / properties / delegationId
      Added value: +{
      +  "type": "string"
      +}
  6. First observedv1.11.0

TDQS

A4.4/5.0
Behavior4/5

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

Annotations already cover the destructive, non-read-only nature of the tool. The description adds the non-obvious failure behavior: 'a run that spawns then fails returns normally,' plus the warning to check status before trusting the result.

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 four short sentences, each carrying distinct information: purpose, invocation rule, failure caveat, and default policy. The critical safety warning is front-loaded before the pointer to the delegate skill.

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 10-parameter tool with no output schema, the description covers the key invocation rules, failure behavior, and default policy, while the schema documents every parameter. It does not describe the return/status format or relate to cancel/doctor, but those are minor gaps given the strong schema and annotations.

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?

The input schema has 100% description coverage and already explains each parameter in detail, including spec, workspace, reviewTarget, and reasoningEffort. The description adds only the default-keeping policy for model, reasoningEffort, and fast, which is useful but not essential for understanding the parameters.

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 states a specific verb and resource: 'Delegate a coding task to OpenAI Codex.' It also removes ambiguity by explicitly prohibiting shell invocation, and the action is clearly distinct from the sibling tools cancel and doctor.

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?

It gives an explicit when-not and alternative: 'Never run codex from the shell — use this tool.' It also directs the agent to check status before trusting results and to keep model, reasoningEffort, and fast at defaults unless the user asks.

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/andreilungeanu/codex-delegate-mcp'

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