Skip to main content
Glama

Cancel Task

tasks_cancel
Destructive

Tool equivalent of the native MCP tasks/cancel, listed for clients without the Tasks capability. Requests cooperative cancellation of a task_id and returns the Task status document. Whether the Territory Solution is unchanged or partially updated follows the originating tool.

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": "tasks_cancel"
  }
}

Input Schema

NameRequiredDescriptionDefault
task_idYestask_id of the working task to stop.

Output Schema

NameRequiredDescriptionDefault
ttlNo
_metaNo
phaseNo
statusNo
taskIdNo
progressNo
sleep_msNo
terminalNo
createdAtNo
poll_loopNo
next_actionNo
do_this_nextNo
next_poll_atNo
pollIntervalNo
lastUpdatedAtNo
source_statusNo
statusMessageNo
recommended_poll_delay_msNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed4 schema fields changed
    • addedInput schema / properties / task_id / description
      Added value: +"task_id of the working task to stop."
    • removedOutput schema / additionalProperties
      Removed value: -true
    • addedOutput schema / properties
      Added value: +{
      +  "_meta": {
      +    "type": "object"
      +  },
      +  "createdAt": {
      +    "type": "string"
      +  },
      +  "do_this_next": {
      +    "type": "object"
      +  },
      +  "lastUpdatedAt": {
      +    "type": "string"
      +  },
      +  "next_action": {
      +    "type": "string"
      +  },
      +  "next_poll_at": {
      +    "type": "string"
      +  },
      +  "phase": {
      +    "type": "string"
      +  },
      +  "pollInterval": {
      +    "type": "integer"
      +  },
      +  "poll_loop": {
      +    "type": "object"
      +  },
      +  "progress": {
      +    "type": "number"
      +  },
      +  "recommended_poll_delay_ms": {
      +    "type": "integer"
      +  },
      +  "sleep_ms": {
      +    "type": "integer"
      +  },
      +  "source_status": {
      +    "type": "string"
      +  },
      +  "status": {
      +    "type": "string"
      +  },
      +  "statusMessage": {
      +    "type": "string"
      +  },
      +  "taskId": {
      +    "type": "string"
      +  },
      +  "terminal": {
      +    "type": "boolean"
      +  },
      +  "ttl": {
      +    "type": "integer"
      +  }
      +}
    • removedOutput schema / title
      Removed value: -"tasks_cancelDictOutput"
  2. First observed

TDQS

A3.7/5.0
Behavior4/5

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

Adds meaningful context beyond the annotations: cancellation is 'cooperative' (so the task may not stop immediately) and the resulting territory state may be unchanged or partially updated depending on the originating tool — a genuinely useful warning for a destructiveHint=true operation. It does not restate non-idempotency, but that is already covered by the annotations.

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?

Three tight sentences with the client-targeting condition and the cooperative nature front-loaded. Minor deduction for the unexplained domain phrase 'Territory Solution,' which costs a bit of clarity without adding bulk.

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?

An output schema exists, so return values need not be described, and the description still notes that a Task status document is returned. Combined with the partial-update caveat and cooperative semantics, an agent has enough to invoke this correctly.

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 a single parameter with 100% schema description coverage, so the schema already fully documents task_id. The description merely repeats the identifier in a sentence and adds no format or semantics beyond it; baseline 3 applies.

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 ('Requests cooperative cancellation of a task_id') and identifies itself as the tool equivalent of the native MCP tasks/cancel for clients lacking the Tasks capability. It doesn't explicitly contrast with siblings tasks_get and tasks_result, but the cancel-versus-read distinction is implicit in the wording.

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?

Provides one real selection criterion: use this when the client lacks the Tasks capability. It does not say when cancellation is appropriate versus polling via tasks_get or tasks_result, nor are any prerequisites or exclusions given.

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

Try in Browser

Glama MCP Gateway

Add one secure layer between your agents and this server.

Resources