Skip to main content
Glama

cancel_task

cancel_task
Destructive

Cancel a running or queued task by ID in the tianshu-mcp async task system. Stops CLI agent process trees, clicks GUI stop buttons, and removes queued tasks.

Instructions

取消运行中任务:CLI agent 终止进程树;GUI agent(codex 等)尽力点击界面停止按钮并等待 GUI 空闲(有界超时),未确认停止时结果中明示。排队中任务直接移除;终态任务无动作。

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
reasonNo
taskIdYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A4/5.0
Behavior5/5

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

Adds substantial context beyond annotations: CLI agents kill the process tree while GUI agents best-effort click a stop button with a bounded timeout, and unconfirmed stops are surfaced in the result. This discloses mechanism, timeout bounds, and failure reporting for a destructive operation.

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?

A single dense sentence-cluster that front-loads mechanism (CLI/GUI) then state handling. Every clause carries information, though the GUI branch could be tightened slightly.

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?

With no output schema, the description usefully notes that unconfirmed stops are reported in the result. It covers destructive behavior and edge states well, but leaves the optional reason parameter unaddressed.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters2/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 0%, so the description must carry parameter meaning, but it mentions neither taskId nor reason. The purpose implies taskId identifies the target, yet the optional 'reason' parameter is entirely undocumented in both schema and description.

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 (取消/cancel) and resource (任务/task), and goes further by defining behavior per task state (running, queued, terminal). An agent can immediately distinguish this from siblings like continue_task or rework_task.

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 state-based breakdown (running vs queued vs terminal) implies when the tool is appropriate, and 'no action for terminal tasks' warns of a no-op. However, it never explicitly names an alternative tool or states conditions for choosing cancel over verify_task/rework_task.

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