Skip to main content
Glama

codex_cancel

Cancel a specific Codex job by job_id or all running jobs in a task group to stop unwanted execution.

Instructions

Terminate a running Codex job (by job_id) or all running jobs in a group.

Tool call template

This tool declares no required parameters. Add optional parameters from the input schema as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {},
    "name": "codex_cancel"
  }
}

Input Schema

NameRequiredDescriptionDefault
groupNoCancel all running jobs in this task group.
job_idNoSpecific job ID to cancel.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv2.1.0

TDQS

A3.5/5.0
Behavior3/5

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

No annotations are supplied, so the description carries the full burden. It conveys that this is a destructive operation and, notably, that it applies only to *running* jobs (finished work is untouched), which is real behavioral information. It omits whether the cancel is idempotent, what happens to partial output, permission requirements, and what is returned.

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?

A single well-formed sentence with the action front-loaded and both modes parenthetically scoped; nothing is wasted or buried.

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 two-parameter tool with no annotations and no output schema, the description covers the mode split adequately but leaves open what the caller gets back and whether both parameters can or should be supplied together. Adequate, not complete.

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%, so the schema already documents both properties. The description only restates the job_id vs. group distinction in prose, adding no format, precedence, or mutual-exclusion guidance beyond the schema.

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 job") plus the two selectors, single job vs. group, so the agent knows exactly what the tool does. It does not name any sibling such as codex_app_cancel_job, so cross-tool disambiguation is left implicit.

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 purpose implies when to use it (stopping running work), but there is no explicit when-to-use/when-not statement and no guidance on choosing it over a similarly named sibling. Usage is left to inference.

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