Skip to main content
Glama

codex_cancel

Destructive

Interrupts the current Codex turn while keeping existing file edits, then lets you check the conversation state until cancellation completes.

Instructions

Request interruption of the current Codex turn. File edits already made are retained. Query state until cancelled/completed.

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": {
      "conversation_id": "<conversation_id>"
    },
    "name": "codex_cancel"
  }
}

Input Schema

NameRequiredDescriptionDefault
conversation_idYesBridge conversation_id returned by codex_start/resume/list

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A3.8/5.0
Behavior4/5

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

Annotations flag destructiveHint=true, and the description usefully narrows that: file edits already made are retained, which tells the agent what survives. It also reveals the asynchronous nature ('Request interruption', then poll state) that the annotations do not convey. It omits what happens if the turn has already completed or whether repeated cancels are harmless.

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?

Three short sentences, front-loaded with the action, then the side-effect guarantee, then the follow-up step. No redundant or filler wording.

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 an async mutation with no output schema, the description covers the key facts: it is a request rather than a guarantee, edits persist, and state must be polled. A note on the returned acknowledgement or on completed-turn behavior would close the 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?

Only one parameter, and the schema already documents conversation_id at 100% coverage including its provenance from codex_start/resume/list. The description adds no syntax, format, or validation meaning beyond that, so the baseline 3 applies.

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: 'Request interruption of the current Codex turn.' That is unambiguous and separable from siblings like codex_wait or codex_respond. It stops short of naming a sibling to differentiate from, so it lands at 4 rather than 5.

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 instruction 'Query state until cancelled/completed' implies a follow-up pattern, but no sibling tool is named and there is no explicit when-not guidance (e.g. what to do if the turn already finished). Usage is implied rather than directed.

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