Skip to main content
Glama
antigravity-codex-mcp
by Sunlazys

codex_poll

Long-poll an asynchronous Codex job to wait for completion or new events, returning only events after a cursor and reporting truncation for safe, replayable progress tracking.

Instructions

Safely long-poll an asynchronous Codex job (wait_seconds <= 55). Supports replayable cursor (returns seq > cursor), truncation reporting, terminal/events wakeup modes, and optional intermediate event omission.

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": {
      "job_id": "<job_id>"
    },
    "name": "codex_poll"
  }
}

Input Schema

NameRequiredDescriptionDefault
cursorNoLast seen event seq; returns events with seq > cursor (default 0).
job_idYesJob ID returned by codex_run/resume/fork/review.
wait_modeNoWakeup mode: 'terminal' (default) waits until job finishes or wait_seconds elapses; 'events' wakes immediately on any new event.
wait_secondsNoLong-poll duration in seconds (default 55, max 55).
include_eventsNoInclude intermediate recent_events in response (default false in 'terminal' mode to save host context, true in 'events' mode).

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.2.0

TDQS

A3.6/5.0
Behavior4/5

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

With no annotations, the description still discloses meaningful behavior: a hard 55-second wait cap, replayable cursor semantics (returns seq > cursor), truncation reporting, and that intermediate events are omitted by default to save host context. Remaining gaps are error/timeout handling and explicit confirmation that the call has no side effects, though "Safely" gestures at that.

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?

A single front-loaded sentence with the verb first, followed by the capability list; nothing is wasted. The parenthetical repeat of the wait limit duplicates the schema's maximum, a minor redundancy.

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?

For a polling tool with no output schema and no annotations, the description covers the timing and replay model but never says what a response actually contains (job status, terminal marker, event payload shape). It is adequate but leaves the agent guessing at return semantics.

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%, and the description's parameter content (wait_seconds <= 55, cursor returns seq > cursor, wakeup modes) largely restates what the schema already documents in detail. It adds no syntax or interaction nuance beyond the schema, so 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?

"Safely long-poll an asynchronous Codex job" states a specific verb and resource, and the parenthetical pins the wait ceiling. It does not explicitly separate itself from siblings like codex_result (final results) or codex_get_session, so an agent must infer that boundary.

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?

Long-polling implies the use case of waiting on an async job, and the wakeup-mode phrasing hints at when to prefer immediate event wakeup versus terminal waiting. However, there is no explicit guidance on when to prefer this over codex_result or codex_list_jobs, and no stated prerequisites.

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