Skip to main content
Glama

cancel

DestructiveIdempotent

Stop active Codex delegation runs by delegation ID, thread ID, or all. Use it when a run wedges or is unwanted; it waits for settlement and reports the outcome.

Instructions

Cancel active runs. delegationId selects one (announced in progress before spawn — the only handle if a run wedges at startup), threadId all on its thread, neither all. Waits for settlement; if a process tree survives the kill deadline, it still returns and the delegate result warns. Status: cancelled, nothing-active, or not-found (no active run with this ID).

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
threadIdNo
delegationIdNo

Schema Changelog

Changes observed during successful MCP inspections. Dates show when Glama detected each change.

  1. Changed2 schema fields changedv1.21.1
    • removedInput schema / properties / delegationId / description
      Removed value: -"Cancel this one delegation, by the id announced in its progress stream"
    • removedInput schema / properties / threadId / description
      Removed value: -"Cancel every delegation running on this Codex thread"
  2. Changed1 schema field changedv1.18.1
    • changedOutput schema / (root)
      Previous value: -{
      -  "$schema": "http://json-schema.org/draft-07/schema#",
      -  "additionalProperties": true,
      -  "properties": {
      -    "status": {
      -      "enum": [
      -        "cancelled",
      -        "nothing-active",
      -        "not-running",
      -        "not-found"
      -      ],
      -      "type": "string"
      -    }
      -  },
      -  "required": [
      -    "status"
      -  ],
      -  "type": "object"
      -}New value: +null
  3. Changed3 schema fields changedv1.14.1
    • addedInput schema / properties / delegationId
      Added value: +{
      +  "description": "Cancel this one delegation, by the id announced in its progress stream",
      +  "type": "string"
      +}
    • changedInput schema / properties / threadId / description
      Previous value: -"Cancel only when this thread is active"New value: +"Cancel every delegation running on this Codex thread"
    • changedOutput schema / properties / status / enum
      Previous value: -[
      -  "cancelled",
      -  "nothing-active",
      -  "not-owned"
      -]New value: +[
      +  "cancelled",
      +  "nothing-active",
      +  "not-running",
      +  "not-found"
      +]
  4. First observedv1.11.0

TDQS

A4.6/5.0
Behavior4/5

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

Annotations already declare destructiveHint=true and idempotentHint=true, and the description adds meaningful behavioral context: it waits for settlement, returns even if a process tree survives the kill deadline, and warns via the delegate result. It also enumerates the three possible statuses. This goes beyond the annotations without contradicting them.

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 dense sentences with no filler. The most important selection semantics are front-loaded, and the status outcomes are compactly listed at the end. Every clause earns its place.

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 cancellation tool with no output schema, the description covers selection semantics, wait behavior, failure behavior, and status outcomes. It does not describe the exact shape of the return value, but the status list and warning note give an agent enough to interpret the result. The sibling tools are simple enough that no further context is needed.

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

Parameters4/5

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

Schema coverage is 0%, so the description must carry the parameter semantics, and it does: delegationId selects one run, threadId selects all on a thread, and neither selects all. It also explains the special significance of delegationId as the only handle for a wedged startup. This fully compensates for the empty schema descriptions.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description opens with a specific verb and resource ('Cancel active runs') and immediately distinguishes the two selection modes (delegationId vs threadId) and the all-runs fallback. It also names the sibling context by explaining when delegationId is the only handle, which clearly separates it from delegate and doctor.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines5/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

It explicitly states when to use delegationId (announced in progress before spawn, the only handle if a run wedges at startup), when to use threadId (all runs on its thread), and when to use neither (all active runs). This is direct when-to-use guidance with no ambiguity.

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

Install Server

Other Tools

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/andreilungeanu/codex-delegate-mcp'

If you have feedback or need assistance with the MCP directory API, please join our Discord server