Skip to main content
Glama

Cancel a hub task

hub_cancel
DestructiveIdempotent

Cancel an unfinished subagent-swarm-mcp task by ID, marking it cancelled to stop pending work and allow requeueing.

Instructions

Cancel a task that is not finished. Terminal: accepted, cancelled (and failed/rejected until requeued).

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": {
      "id": "<id>"
    },
    "name": "hub_cancel"
  }
}

Input Schema

NameRequiredDescriptionDefault
idYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.3.0

TDQS

B3.4/5.0
Behavior3/5

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

Annotations already declare destructiveHint=true, idempotentHint=true and readOnlyHint=false, so the safety profile is covered. The description adds state semantics (precondition, resulting states) which is real value, but the dangling 'Terminal: accepted, cancelled (and failed/rejected until requeued)' is ambiguous about what happens to an already-finished task and what errors or no-ops to expect.

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?

Two short sentences with the action and precondition front-loaded and no filler. The second sentence, however, is compressed to the point of being cryptic, so the brevity costs some interpretability.

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 destructive, non-read-only mutation with no output schema, the definition should clarify behavior when the task is already finished or already cancelled (the idempotent hint suggests a no-op versus the 'not finished' precondition implying rejection). It covers the state model at a high level but leaves that key edge case and the response behavior unclear.

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 a single required parameter at 0% schema description coverage, the description offers no meaning beyond the schema's regex pattern, which already conveys the T########-######-xx ID format. It implicitly identifies the parameter as the task to cancel but adds no format, lookup, or validation guidance.

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 gives a specific verb and resource ('Cancel a task') and adds a scope qualifier ('not finished'), so an agent knows exactly what operation it performs. It does not explicitly differentiate itself from the sibling cancel tools (swarm_cancel, zcode_cancel), but the hub_ prefix and task-ID pattern make the target domain reasonably clear.

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

Usage Guidelines3/5

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

The precondition 'that is not finished' implies when the tool is applicable, but there is no explicit guidance on what to do instead when a task is already terminal or already cancelled (e.g., hub_requeue or hub_show). Alternatives and exclusions are left to inference.

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