Skip to main content
Glama

codex_job_cancel

Terminate a stuck or looping Codex worker job by canceling its process tree to stop runaway execution.

Instructions

Immediately terminate a stuck, looping, or off-track Codex worker process tree.

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

Input Schema

NameRequiredDescriptionDefault
job_idYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv1.0.0

TDQS

A3.5/5.0
Behavior3/5

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

No annotations are provided, so the description carries the full behavioral burden. 'Immediately terminate' and 'process tree' usefully convey that child processes are killed and that there is no graceful shutdown, but it doesn't state whether the kill is irreversible, what happens to the job record afterward, or whether the job can be resumed.

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?

One front-loaded sentence with zero filler; the verb and urgency marker come first and the qualifying conditions follow naturally.

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 simple one-parameter destructive tool with no annotations and no output schema, the description covers the what and the when but omits the post-conditions an agent needs: whether termination is irreversible, what state the job ends in, and how to supply job_id.

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

Parameters2/5

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

Schema description coverage is 0% and the single job_id parameter is never mentioned in the description. The agent gets no guidance on the expected identifier format or where to obtain a valid job_id (presumably from codex_job_status or codex_exec), leaving the only parameter entirely undocumented.

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 (terminate) and resource (Codex worker process tree), with the qualifier 'immediately' signaling urgency. The action is clearly distinct from read-only siblings like codex_job_status, though the description never explicitly contrasts with them.

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?

Gives concrete triggering conditions — 'stuck, looping, or off-track' — so an agent knows when to reach for it. It stops short of stating when NOT to use it or naming an alternative (e.g., codex_resume for recoverable jobs), which keeps it below a 5.

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