Skip to main content
Glama

Cancel a running swarm subagent task

swarm_cancel
Idempotent

Terminate a running cb_* or qd_* process group, or stop a session-based ZCode task by task ID, to end subagent work that is no longer needed.

Instructions

Terminate a running cb_* process group or click Stop on a running sess_* ZCode task.

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": {
      "taskId": "<taskId>"
    },
    "name": "swarm_cancel"
  }
}

Input Schema

NameRequiredDescriptionDefault
taskIdYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.3.0

TDQS

C2.9/5.0
Behavior2/5

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

Annotations already declare readOnlyHint=false, idempotentHint=true, and destructiveHint=false, so the safety profile is supplied externally. The description adds almost nothing beyond them: it does not say whether the call errors on an already-completed task, whether partial output remains retrievable via swarm_result, or what the effect on the underlying process group is. "Click Stop on a running sess_* ZCode task" is a UI metaphor that gives the agent no actionable behavioral detail.

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?

A single front-loaded sentence with the action verb first and zero filler. The only weakness is the mixed register — "Terminate a process group" next to "click Stop" — which reads like two different mental models stitched together rather than one coherent instruction.

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

Completeness3/5

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

For a one-parameter tool with an output schema absent but annotations covering safety and idempotency, the definition is close to sufficient. Still missing are the qd_* case, the already-terminal-task behavior, and any hint about whether the cancelled task's results survive — all of which matter for a cancellation operation.

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?

With 0% schema description coverage, the description carries the burden, and it does helpfully explain which identifier prefixes are valid (cb_* and sess_*), which maps directly onto the taskId regex. However, it omits the qd_* prefix that the schema pattern explicitly permits, leaving one accepted identifier form unexplained.

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?

The description names a specific verb ("Terminate"/"Stop") and a specific resource (a running subagent task), and its prefix notation (cb_*, sess_*) tells the agent exactly what kinds of task identifiers it acts on. It does not distinguish itself from the sibling cancel tools hub_cancel and zcode_cancel, which is the main missing piece for full clarity.

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

Usage Guidelines2/5

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

The only usage signal is the implicit "running" qualifier — it hints the task must be live, but never says what happens if the task already finished or failed. It also gives no guidance on choosing this over hub_cancel or zcode_cancel, despite those siblings appearing to cover overlapping cancellation territory.

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