Skip to main content
Glama

取消 DSH 任务

dsh_cancel
Destructive

Cancel a queued or running task by task ID; running tasks have their entire process tree terminated.

Instructions

取消排队中或运行中的任务:运行中的任务会杀掉整个进程树。

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

Input Schema

NameRequiredDescriptionDefault
task_idYesdsh_run 返回的任务 id

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.7.2

TDQS

A3.8/5.0
Behavior4/5

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

The annotations already declare destructiveHint=true, so the description does not need to establish that this is destructive. The description still adds useful detail beyond the annotations: it states the scope of destruction ('kills the entire process tree'), which tells the agent that child processes are terminated and not just the task record. It does not say what happens to a queued task that is removed and never started, or whether the task state changes.

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 one front-loaded sentence with no padding; it states the applicable states first and the destructive consequence second.

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?

For a single-parameter mutation tool whose annotations already flag destructiveness, the description is nearly sufficient: it identifies the states it acts on and the extent of termination. It does not cover post-cancel behavior (the returned confirmation or resulting task state), which prevents a 5.

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 single task_id parameter already documents its origin ('dsh_run 返回的任务 id'). The description adds no further parameter meaning, so the baseline of 3 is appropriate.

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?

The description names a specific verb and resource (取消/cancel a task) and narrows the scope to tasks that are queued or running. It is distinct from the broader set of dsh_ tools, but it does not explicitly mention dsh_status or other tools that provide alternative ways to check or manage tasks.

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 description implies when this tool applies by saying it handles queued or running tasks, which also hints that completed tasks are out of scope. However, it gives no explicit 'do not use when' guidance, no prerequisite such as 'check dsh_status first', and no information about alternatives.

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