Skip to main content
Glama

codex_cancel

Idempotent

Cancels a queued or running job and waits for process-stop evidence to confirm the halt, quarantining execution if the stop is unconfirmed.

Instructions

Cancel a queued or running Codex job. Waits for process-stop evidence; an unconfirmed stop quarantines execution.

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_cancel"
  }
}

Input Schema

NameRequiredDescriptionDefault
job_idYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. Addedv1.4.0

TDQS

A3.8/5.0
Behavior4/5

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

Annotations already declare non-readonly, idempotent, non-destructive, so the description's real contribution is the blocking semantics ('waits for process-stop evidence') and the failure consequence ('an unconfirmed stop quarantines execution') — neither of which is derivable from the annotations. What is missing is any sense of how long it waits or whether a timeout surfaces as an error or as the quarantine path.

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?

Two short sentences with the action first and the failure behavior second; there is no redundant restatement of the tool name or padding of any kind.

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 one-parameter operation with annotation coverage and no output schema, the description covers the essential behaviors: what is cancelled, that it blocks, and what happens if the stop is unconfirmed. The remaining omissions — return shape and timeout behavior — are minor given the tool's simplicity.

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 0%, so the single job_id parameter is documented only by its name. That name is largely self-explanatory, but the description does not say where a job_id comes from (presumably the spawn/delegate tools) or what form it takes, leaving a small but real gap for a required identifier.

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?

The description gives a specific verb ('Cancel') and resource ('Codex job') and scopes it to jobs that are 'queued or running', which is enough to distinguish it from sibling tools like codex_status or codex_job_result. It never explicitly contrasts itself with the parallel agy_cancel family, so the sibling separation is implied by the 'Codex' label rather than stated.

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?

The phrase 'queued or running' gives a usable precondition for when this tool applies, but there is no guidance on when not to use it, no pointer to codex_status for checking whether a job is still cancellable, and no note on how it relates to agy_cancel for other job families. Usage is inferable but not spelled out.

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