Skip to main content
Glama

cancel

DestructiveIdempotent

Terminate active Codex delegation runs by ID, thread, or all, waiting until processes actually end.

Instructions

Cancel in-flight Codex delegations owned by this server. Returns once the processes have actually ended, not when the kill was requested. Name one with delegationId (announced in progress before the run starts, and the only handle for a run that wedges during startup) or threadId (cancels every delegation on that thread). With neither, every active delegation is cancelled.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
threadIdNoCancel every delegation running on this Codex thread
delegationIdNoCancel this one delegation, by the id announced in its progress stream

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
statusYes
Behavior5/5

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

Beyond annotations (destructive, idempotent), the description adds critical behavior: waits for processes to actually end before returning, and canceling all active when no ID is given. This clarifies side effects and sync semantics.

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 sentences, front-loaded with the main purpose, and every sentence adds value—scope, return semantics, and selection rules. No redundancy or filler.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness5/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given no required params, an output schema, and strong annotations, the description fully covers the tool's behavior, including edge case of 'wedges during startup' and the fallback to cancel-all.

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

Parameters5/5

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

Schema descriptions define each parameter, but the tool description enriches them: delegationId targets a single run, threadId cancels all on a thread, and omitting both cancels every active delegation. This meaningfully goes beyond the schema.

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?

Description states the specific verb 'Cancel' and resource 'in-flight Codex delegations owned by this server.' It clearly distinguishes from siblings (delegate creates, doctor diagnoses) by focusing on stopping existing work.

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?

Provides explicit targeting options: delegationId for one, threadId for all on a thread, or none for all active. Gives useful context (delegationId is announced in progress, only handle for wedged startup). Does not explicitly mention alternatives like doctor, but usage context is clear.

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