Skip to main content
Glama
antigravity-codex-mcp
by Sunlazys

codex_cancel

Cancel an active Codex job by terminating its process tree; safe against concurrent completion and retryable if termination fails.

Instructions

Cancel an active Codex job by terminating its process tree. Atomic against completion and retryable on kill failure.

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_idYesJob ID to cancel.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.2.0

TDQS

A3.8/5.0
Behavior4/5

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

With no annotations, the description carries the full burden and does meaningful work: it discloses that cancellation kills the whole process tree, that it is 'atomic against completion' (racing with a job finishing), and that it is 'retryable on kill failure'. It does not say whether partial output/artifacts are preserved or what a successful response contains.

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, zero filler, and the core action is front-loaded before the behavioural caveats. Every clause adds information.

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 destructive, annotation-free, no-output-schema tool, the definition covers mechanism, race semantics and retry behaviour well. It stops short of describing the post-cancel state (are results retained?) or any permission requirements, which is the main remaining gap.

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?

Single parameter with 100% schema description coverage, so the schema already defines job_id. The description adds no extra constraint on the identifier beyond implying the job should be active, which is the baseline expectation for a fully covered 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 and resource ('Cancel an active Codex job') plus the mechanism ('terminating its process tree'), which makes the intent unambiguous. It does not explicitly contrast itself with siblings such as codex_poll or codex_result, but the scoping to 'active' jobs already separates it from read/retrieval tools.

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 by the word 'active' — an agent can infer this applies to running, not finished, jobs. There is no explicit when-not guidance (e.g., what to do with a completed job) and no named alternative for retrieving results instead of cancelling.

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