Skip to main content
Glama

cancel

Stop a delegated task's current operation by task_id, potentially preventing a prompt from being sent or interrupting in-flight work; verify delivery and terminal state afterward.

Instructions

请求停止 task_id 的当前操作,可能阻止 prompt 发出或中断在途工作。先用 status 核对目标轮及开工或终态证据。delivery 记录取消指令的送达情况。调用后核对同一轮的 prompt_terminal、stop_reason 和 native_stop_confirmed,判断原轮是否被取消。DSH 会话由 close 关闭。

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

Input Schema

NameRequiredDescriptionDefault
task_idYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.2.4

TDQS

A4.6/5.0
Behavior5/5

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

With no annotations, the description carries the full burden and does so well: it discloses that cancel is a best-effort request that may prevent a prompt from being issued or interrupt in-flight work, not a guaranteed hard stop. It further names where delivery/acknowledgement is recorded and which fields (prompt_terminal, stop_reason, native_stop_confirmed) prove the outcome — unusually rich behavioral context for a mutation tool.

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?

Four sentences, each doing a job: what it does, pre-check, delivery record, post-check, and the close boundary. It is dense with operational vocabulary but front-loads the core action; minor tightening is possible around the delivery sentence.

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?

There is no output schema, so the description must convey what comes back — and it does, naming delivery, prompt_terminal, stop_reason, and native_stop_confirmed as the observable results. Combined with the pre-check and the close alternative, an agent has everything needed to invoke and interpret it 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?

The schema documents nothing (0% coverage) for task_id, and the description only implies it identifies a task with addressable rounds (introducing round targeting not present in the schema). It recovers some meaning by tying the parameter to round-scoped evidence, but does not define the identifier's format or how a round within a task is selected.

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?

States a specific verb+resource: request to stop the current operation of task_id, and explicitly limits the scope to the current operation rather than the whole task. It also names the sibling it is not — 'DSH 会话由 close 关闭' — so an agent can distinguish cancel from close without opening either 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?

Gives a clear prerequisite workflow ('先用 status 核对目标轮及开工或终态证据') and an explicit alternative for a similar-sounding need (sessions are handled by close, not cancel). It also prescribes post-call verification, leaving little to inference about when this tool is the right choice.

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