Skip to main content
Glama

codex_cancel

Cancel a running background Codex job by job_id to stop unwanted or stuck tasks and free resources.

Instructions

Cancel a running background Codex job by job_id.

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_idYesThe job_id to cancel.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv1.2.0

TDQS

B3.2/5.0
Behavior2/5

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

No annotations are supplied, so the description carries the full behavioral burden, and it discloses almost nothing about the mutation. It does not say whether cancellation is idempotent, what happens to partial/intermediate output, whether an authorization or ownership check applies, or how the tool responds when job_id is unknown or the job is no longer running.

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?

One sentence with the verb and scope front-loaded and no filler. Nothing is wasted, though the terseness is arguably achieved by omitting content that would have been useful.

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 one-parameter control tool with no output schema, the definition is minimally sufficient to select and call it. It is still incomplete for a mutation with zero annotation coverage, since outcome and failure behavior are left entirely to inference.

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?

There is a single required parameter with 100% schema coverage, so the schema already explains job_id fully. The description adds no format, provenance (where to obtain the job_id, e.g. from codex_start or codex_status), or validation detail beyond the schema, which is the baseline expectation here.

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 (cancel) and a specific resource (running background Codex job), scoped by job_id. An agent can tell it apart from codex_status or codex_run by the word 'cancel' alone, though the description never explicitly contrasts itself with those siblings.

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?

Usage is only implied: the adjective 'running' hints that the target must be an active job. The description does not say whether to check codex_status first, what to do if the job has already finished or failed, or whether there are alternatives for stopping work.

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