Skip to main content
Glama

codex_wait

Waits for a background Codex task to finish, returning minimal status while it runs and full structured output when complete, with optional progress updates every 15 seconds.

Instructions

Wait up to wait_seconds (default 180) for a background Codex task to finish. Returns minimal status ({task_id, status, session_id, elapsed_ms}) while still running, and full structured output once finished. Emits progress notifications every 15s when the client supplies a progressToken.

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_id": "<task_id>"
    },
    "name": "codex_wait"
  }
}

Input Schema

NameRequiredDescriptionDefault
task_idYesThe task_id returned by codex_run or codex_review.
wait_secondsNoMaximum seconds to wait. Default: 180.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv1.0.0

TDQS

A3.8/5.0
Behavior4/5

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

With no annotations, the description carries the full burden and largely meets it: it discloses the default 180s wait, the two distinct response modes (minimal status while running, full structured output when finished), and the 15s progress-notification cadence gated on progressToken. It does not say whether a timeout returns running-status vs. an error, or whether the wait is interruptible.

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?

Three tightly packed sentences, front-loaded with the verb and timeout, then the return contract, then the notification behavior. The inline field list ({task_id, status, session_id, elapsed_ms}) earns its space by replacing a missing output schema.

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?

No output schema exists, so it is valuable that the description enumerates the running-state return fields and distinguishes the finished-state output. Edge cases an agent would want (invalid task_id, timeout semantics, whether the task keeps running after timeout) remain unstated.

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 both parameters are already documented, and the description's restatement of the default (180) and the task_id provenance adds nothing new. Baseline 3 applies.

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: 'Wait up to wait_seconds ... for a background Codex task to finish,' plus the return shape in each state. It is clearly a blocking wait rather than a status poll, but it never names codex_status, so the boundary with that sibling is only implied.

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 usage after launching a background task via the task_id framing, and discloses the default and max wait. It gives no explicit when-to-use versus codex_status (non-blocking poll) or codex_cancel, and no guidance on choosing a wait_seconds value or retry behavior on timeout.

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