Skip to main content
Glama

Cancel a task

tasks_cancel
DestructiveIdempotent

Cancel a task to stop polling a handle you no longer need. Updates task state without killing external processes, ensuring clean cleanup of unused tasks.

Instructions

Mark a task cancelled. Use to stop polling a handle you no longer need. Does not kill an external worker process — it only updates kernel state. Destructive relative to the handle, idempotent if already cancelled. Missing ids return cancelled=false. Prefer tasks_get first. Auth: tool policy gate.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
task_idYesTask id to mark cancelled.

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changedv0.5.0
    • addedInput schema / properties / task_id / description
      Added value: +"Task id to mark cancelled."
  2. First observedv0.4.0

TDQS

A4.5/5.0
Behavior5/5

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

The description adds substantial behavioral detail beyond the annotations: it clarifies that the operation 'does not kill an external worker process', only updates kernel state, is 'destructive relative to the handle', is 'idempotent if already cancelled', and that missing ids 'return cancelled=false'. This is exactly the kind of nuance an agent needs and is not present in the annotations or schema.

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

Conciseness5/5

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

The description is compact and every sentence adds relevant information: purpose, use case, side-effect scope, destructiveness, idempotency, failure behavior, suggested prerequisite, and auth. The primary purpose is front-loaded in the first sentence, and no sentences are wasted.

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 single-parameter cancellation tool with rich annotations and an output schema, the description is complete. It covers the operation's semantic effect, non-effects, idempotency, missing-id behavior, authentication, and relationship to tasks_get. An agent has enough information to use this tool correctly without further investigation.

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?

Schema coverage is 100% and the only parameter, task_id, has a clear description in the schema. The tool description adds no new parameter-level meaning; the missing-id behavior is a return-value concern rather than parameter semantics. Baseline 3 is appropriate since the schema carries the parameter documentation burden.

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 opens with 'Mark a task cancelled', a specific verb and resource that clearly identifies the tool's function. It further distinguishes the tool from siblings by framing its use case as 'stop polling a handle you no longer need', which separates cancellation from get/update/list operations.

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 clear context for when to use the tool: 'Use to stop polling a handle you no longer need.' It also gives sequencing guidance with 'Prefer tasks_get first.' It does not explicitly name alternatives or list when-not-to-use cases, but the context is sufficiently clear for an agent to decide.

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