Skip to main content
Glama

task.cancel

Cancel a running or queued asynchronous task by task ID to stop unnecessary work and free resources.

Instructions

Request cancellation for a running or queued asynchronous 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": {
      "task_id": "<task_id>"
    },
    "name": "task.cancel"
  }
}

Input Schema

NameRequiredDescriptionDefault
task_idYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

B3.1/5.0
Behavior2/5

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

No annotations are supplied, so the description carries the full behavioral burden, and it leaves key traits unstated. 'Request cancellation' hints the cancel may be best-effort and not immediate, but it does not say whether the call blocks, whether partial results survive, what happens on a completed task, or whether repeats are idempotent — significant gaps for a state-changing operation.

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 clause, front-loaded with the action and scope, with no wasted words. It is efficient; the shortfall is under-specification rather than verbosity.

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

Completeness2/5

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

For a state-changing task tool with no annotations and no output schema, the description should say what the caller learns (immediate acknowledgement vs. eventual cancellation) and any prerequisite state. None of that is present, so an agent cannot predict the response or the post-condition.

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?

There is one required parameter (task_id) at 0% schema description coverage, and the description never mentions it, its format, or where the id comes from (e.g., the handle returned when the task was submitted). The parameter's meaning is largely inferable from its name in a one-parameter schema, so this is a modest rather than severe gap.

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?

States a specific verb and resource ('Request cancellation') plus the target scope ('a running or queued asynchronous task'), so an agent can tell this apart from siblings like task.status or task.result. It stops short of naming those siblings explicitly, so differentiation is implied rather than stated.

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 phrase 'running or queued' implies the conditions under which cancellation applies, giving some usage context. However, it never says what to do instead when the task is finished, whether to poll task.status first, or what to use when you want to wait for a result — no alternatives or exclusions are given.

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

Deploy Server

Other Tools