Skip to main content
Glama

codex

Destructive

Launch detached coding, architecture, or read-only consultation jobs with optional session resume; returns a background job for status, logs, and wait commands.

Instructions

Start Codex CLI for coding, architecture, or read-only consultation with optional sessionId resume. Returns a background job immediately. Run waitCommand or waitCommandPosix (Bash or Zsh), or call job_status with jobId for output.

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": {
      "prompt": "<prompt>"
    },
    "name": "codex"
  }
}

Input Schema

NameRequiredDescriptionDefault
modelNoModel or alias to use (defaults to sol -> gpt-6.2-sol). Aliases auto-resolve from ~/.codex/models_cache.json: sol (gpt-6.2-sol), astra (gpt-6.2-astra), terra (gpt-6.1-terra), or pass any exact slug.
speedNoAlias for serviceTier.
promptYesThe coding task, question, or analysis request (passed cleanly via stdin; no Windows cmd length limits).
sandboxNoSandbox policy for shell command execution (read-only recommended for reviews/consults).
fullAutoNoEnable automatic approval review in the workspace-write sandbox.
sessionIdNoOptional session ID for multi-turn conversational context.
callbackUriNoOptional MCP callback URI passed via environment.
serviceTierNoSpeed tier: fast (priority), ultrafast, or default/standard to disable the override. Case-insensitive. Falls back to CODEX_DEFAULT_SERVICE_TIER. Check listModels for supported tiers.
resetSessionNoStart a fresh Codex thread. A successful reset replaces the session history.
service_tierNoAlias for serviceTier.
reasoningEffortNoReasoning effort depth: none, minimal, low, medium, high, xhigh, max, ultra (also accepts snake_case reasoning_effort).
reasoning_effortNoAlias for reasoningEffort.
workingDirectoryNoWorking directory for the agent (passed via -C and process cwd).

Output Schema

NameRequiredDescriptionDefault
toolYes
jobIdYes
modelYes
statusYes
logFileYes
runnerPidYes
sessionIdYes
stderrFileYes
stdoutFileYes
serviceTierYes
waitCommandYes
waitCommandPosixYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv1.0.0

TDQS

A3.8/5.0
Behavior3/5

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

The most valuable disclosure is that it returns a background job immediately, which is not derivable from the annotations and is essential for correct orchestration. However, annotations already flag destructiveHint=true and openWorldHint=true, and the description never warns that sandbox defaults may modify the workspace or explain what a resetSession discards — significant omissions for a destructive execution tool.

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?

Three front-loaded sentences with no filler: purpose, async contract, then retrieval path. Minor deduction for referencing waitCommand/waitCommandPosix parenthetically without clarifying when to prefer one over job_status.

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?

For a 13-parameter destructive async tool, the description covers the two things an agent cannot infer from a fully documented schema and output schema: that execution is non-blocking and how to collect results. The remaining gaps are annotation-level concerns rather than missing call instructions.

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 model aliases, sandbox enums, serviceTier, reasoningEffort, and aliases are already documented at the field level. The description only echoes sessionId resume, adding no format, precedence, or interaction detail beyond the schema.

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?

States a specific verb and resource — start Codex CLI — with the intended use cases (coding, architecture, read-only consultation) and resume behavior. It differentiates itself from job_status by framing that as the output-retrieval path, though it does not position itself against review or adversarial_review.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines4/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

Gives clear conditions for use (coding/architecture/consultation) and explicitly routes the agent to follow-up tools for output: waitCommand/waitCommandPosix or job_status with jobId. No when-not-to-use guidance relative to sibling review tools is offered, so it stops short of full alternative coverage.

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