Skip to main content
Glama

cancel-agent

DestructiveIdempotent

Cancel running AI agents or clear the entire workspace with task IDs. Supports single, batch (up to 50), or 'all' to kill active agents and remove state.

Instructions

Cancel running agents or clear the entire workspace.

Cancel: { "task_id": "abc123" } or { "task_id": ["abc", "def"] } (max 50). Clear all: { "task_id": "all", "clear": true } — kills active agents, removes all state.

Running agents are killed (SIGTERM → SIGKILL). Terminal agents are removed from memory.

Find task_id: Read task:///all.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
clearNoRequired when task_id="all". Set true to confirm clearing all tasks.
task_idYesTask ID, array of task IDs (max 50), or "all" to clear workspace.
Behavior4/5

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

Beyond the annotations (destructiveHint, idempotentHint), the description discloses the specific kill signal sequence (SIGTERM → SIGKILL), what happens to terminal agents (removed from memory), and the effect of clearing all state. This adds meaningful behavioral context.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is well-structured with bold section labels, making it scannable. It includes only necessary details and examples, though it is slightly longer than the minimum viable description.

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?

For a cancellation tool with two parameters and no output schema, the description is fully complete. It covers all operational modes, side effects, and auxiliary information (how to find task IDs), leaving no critical gaps.

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?

The input schema already covers both parameters thoroughly, but the description enriches this with concrete JSON examples and clarifies the conditional requirement for 'clear' when task_id='all'. This goes beyond the schema's basic 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 clearly states the tool's function with specific verbs and resources: 'Cancel running agents or clear the entire workspace.' It distinguishes itself from sibling tools (launch, message, answer) by focusing on cancellation and cleanup.

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?

The description provides detailed instructions for both cancellation modes (specific task IDs vs. clear all) and explains how to find task IDs. It implies the appropriate context for use (when you need to stop agents or clean up), though it does not explicitly name alternative tools to avoid.

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/yigitkonur/mcp-supersubagents'

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