Skip to main content
Glama

cancel_task

DestructiveIdempotent

Cancel one queued or scheduled task by task_id when the user drops a single task; use series=true to end its job or series and stop further runs.

Instructions

Cancel one queued or scheduled task by task_id; for all pending, use cancel_all. Use when: the user drops one task. Do not use to delay it (use postpone_task) or rerun a failed one (use retry_task). Behavior: marks it cancelled locally (no network) and redacts its prompt. Also cancels running and submitted tasks; a Batch call may still bill. A job or series skips this run; series=true ends it, even from a finished run. Else a finished task or repeat call changes nothing. Returns: "Task status: ", terminated_at, and a job or series line when ended. Rejects an unknown task_id.

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

Input Schema

NameRequiredDescriptionDefault
seriesNotrue also ends the job or series this task is a run of, so no further run is queued; use it for "stop this for good". Defaults to false: skip only this run; a job then plans its next one. No effect on a one-off task.
task_idYesId of the task to cancel, e.g. 't-3f2a…', from the schedule_task reply or the check_queue_status list.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed2 schema fields changedv0.20.0
    • changedInput schema / properties / series / description
      Previous value: -"If true and the task repeats, also end its series: no further occurrence is queued. Default false (skip only this occurrence)."New value: +"true also ends the job or series this task is a run of, so no further run is queued; use it for \"stop this for good\". Defaults to false: skip only this run; a job then plans its next one. No effect on a one-off task."
    • changedInput schema / properties / task_id / description
      Previous value: -"The id of the task to cancel."New value: +"Id of the task to cancel, e.g. 't-3f2a…', from the schedule_task reply or the check_queue_status list."
  2. Changed1 schema field changedv0.18.0
    • addedInput schema / properties / series
      Added value: +{
      +  "description": "If true and the task repeats, also end its series: no further occurrence is queued. Default false (skip only this occurrence).",
      +  "type": "boolean"
      +}
  3. First observedv0.16.0

TDQS

A4.4/5.0
Behavior4/5

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

Goes well beyond the annotations: local-only mutation with no network, prompt redaction, that running and submitted tasks are also cancelled, that Batch calls may still bill, the job/series skip-vs-end distinction, and that a finished task or repeat call is a no-op. The no-op-on-repeat statement is consistent with idempotentHint, and destructiveHint is consistent with the redaction notice. It stops short of stating permission requirements or how an already-cancelled task is reported, which keeps it off a 5.

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?

Front-loaded with purpose, then routing guidance, then behavior, then return shape; each clause carries information. It is dense and semicolon-heavy, so some clauses (the Batch billing caveat) require careful parsing, but little is genuinely 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 two-parameter mutation tool with no output schema, the description supplies the return string format, the rejection behavior on an unknown task_id, and the no-op and series-ending edge cases. An agent has everything needed to call it correctly and interpret the result.

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 series parameter already carries a full explanation, so the baseline is 3. The description does add a little beyond the schema, notably that series=true ends the series 'even from a finished run' and that a plain call skips only the current run, but task_id itself is not elaborated further.

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?

Opens with a specific verb and resource plus scope: 'Cancel one queued or scheduled task by task_id', then immediately names cancel_all as the different sibling for the bulk case. An agent can tell this apart from cancel_all, postpone_task, and retry_task without opening any schema.

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

Usage Guidelines5/5

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

Explicit when-to-use ('the user drops one task'), explicit when-not ('Do not use to delay it') with the correct alternative named for each case (postpone_task, retry_task, cancel_all). Nothing is left to inference.

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