Skip to main content
Glama

Poll & Respond

codex_check

Poll a coding-agent session for new events and respond to approval or input requests, letting MCP clients track progress and unblock tasks without frequent polling.

Instructions

Poll session for events or respond to approval/input requests.

POLLING FREQUENCY: Do NOT poll every turn. Codex tasks take minutes, not seconds.

  • Treat pollInterval as a minimum hint, not a fixed schedule.

  • "running": sleep at least 2 minutes between polls; increase for complex tasks. Do NOT high-frequency poll — it wastes tokens and provides no benefit.

  • "waiting_approval": poll about every 1000ms and respond quickly to actions[].

  • When status is "idle"/"error"/"cancelled": stop polling, the session is done.

  • Adapt interval based on task complexity and whether the previous poll returned new events.

poll: events since cursor. Default maxEvents=1.

respond_permission: approval decision. Default maxEvents=0 (compact ACK).

respond_user_input: user-input answers. Default maxEvents=0 (compact ACK).

events[].type is coarse-grained; details are in events[].data.method. cursor omitted => use session last cursor. cursorResetTo => reset and continue.

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": {
      "action": "<action>",
      "sessionId": "<sessionId>"
    },
    "name": "codex_check"
  }
}

Input Schema

NameRequiredDescriptionDefault
actionYes
cursorNoEvent cursor (default: session last consumed cursor).
answersNoquestion-id -> answers map (id from actions[] user_input request).
decisionNoApproval decision for respond_permission. acceptWithExecpolicyAmendment requires execpolicy_amendment; applyNetworkPolicyAmendment requires network_policy_amendment.
maxEventsNoMax events. Default: poll=1 (min 1), respond_*=0.
requestIdNoRequest ID from actions[]
sessionIdYesTarget session ID
denyMessageNoDeny reason (not sent to agent)
pollOptionsNoOptional poll shaping controls.
responseModeNoResponse mode. Default: minimal. Options: minimal/delta_compact/full.
execpolicy_amendmentNoFor acceptWithExecpolicyAmendment only
network_policy_amendmentNoFor applyNetworkPolicyAmendment only

Output Schema

NameRequiredDescriptionDefault
errorNo
eventsNo
resultNo
statusNo
actionsNo
isErrorNo
sessionIdNo
truncatedNo
nextCursorNo
pollIntervalNoRecommended minimum delay before next poll (ms): running >=120000, waiting_approval ~=1000.
cursorResetToNo
compatWarningsNo
truncatedFieldsNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv2.1.0

TDQS

A3.8/5.0
Behavior3/5

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

Annotations already declare destructiveHint=false and openWorldHint=false, and the description adds genuinely useful non-schema behavior: token cost of over-polling, treating pollInterval as a minimum hint, and the stop conditions. However, it never discloses the consequence of the mutating branch — that accepting a permission can let the remote agent execute commands — nor that readOnlyHint=false applies only to the respond actions, leaving the mutation risk implicit.

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?

Bulleted and front-loaded, with the most consequential rule ("do NOT poll every turn") stated first. Slightly wasteful: the anti-high-frequency warning is stated twice, and the per-action default maxEvents values restate what the schema descriptions already say.

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, three-action tool with a nested pollOptions object, the description covers the polling loop well and needs not explain return values because an output schema exists. It is thinner on the respond path — answers mapping to question IDs and the accept* decision variants are left entirely to the schema.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters4/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema coverage is already 92%, so the baseline is 3; the description still adds operational meaning by stating the asymmetric maxEvents defaults (poll=1, respond_*=0) and the cursor-omitted fallback to the session's last cursor. Minor inconsistency: it documents a `cursorResetTo` field that does not appear in the input schema, which could mislead an agent trying to reset state.

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?

Opens with a specific verb+resource pairing: "Poll session for events or respond to approval/input requests," and names the three action modes (poll, respond_permission, respond_user_input). An agent can tell what it does, but nothing distinguishes it from the siblings codex, codex_reply, and codex_session — notably it never says whether codex_reply is the preferred path for ordinary messages.

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?

Unusually explicit cadence guidance keyed off status values: wait ~2 minutes while "running," poll ~1000ms while "waiting_approval," and stop entirely on "idle"/"error"/"cancelled." What is missing is tool-level routing — no statement of when to call this versus the sibling reply/session tools.

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

Deploy Server

Other Tools