Skip to main content
Glama

cancel

DestructiveIdempotent

Cancel active delegated runs by specifying a delegation ID, a thread ID, or neither to cancel all. Waits for runs to end and returns status: cancelled, nothing-active, or not-found.

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
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