Skip to main content
Glama

cancel_task

cancel_task
Destructive

Cancel a running or queued task: terminates CLI process trees, stops GUI agents, or removes queued items. For finished GUI tasks, confirms no residual activity and clears pending stop markers.

Instructions

取消运行中任务:CLI agent 终止进程树;GUI agent(codex 等)尽力点击界面停止按钮并等待 GUI 空闲(有界超时),未确认停止时结果中明示。排队中任务直接移除。对已处于终态的 GUI 任务,本调用兼任人工确认入口:人工核实窗口中已无残留运行后调用,可清除 meta 的 guiStopUnconfirmed 待确认标记(不改终态)。

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
reasonNo
taskIdYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A4.3/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 destructiveHint annotation: CLI agent terminates the process tree, GUI agent attempts to click stop and waits with a bounded timeout, queued tasks are simply removed, unconfirmed stops are surfaced in results, and terminal-state calls clear the guiStopUnconfirmed flag without changing final state. No contradiction with annotations.

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 dense but every clause earns its place: it front-loads the core action, then efficiently covers CLI behavior, GUI behavior, queued tasks, and the terminal-state confirmation role without repetition or filler.

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 tool with this many behavioral branches, the description is unusually complete: it covers CLI vs GUI handling, queued removal, timeout expectations, unconfirmed-stop reporting, and the confirmation semantics for terminal GUI tasks. The remaining gap is parameter-level guidance, and there is no output schema, but the behavior itself is sufficiently specified.

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 needed to compensate, but it never explains taskId or reason. taskId is somewhat inferable from context, but reason's purpose is entirely undocumented in both the description and the schema, leaving the agent to guess whether and how it affects cancellation.

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 a specific verb-resource pair, “取消运行中任务,” and then disambiguates by execution mode (CLI vs GUI), queue state, and terminal-state confirmation. This clearly separates it from siblings such as run_task, continue_task, query_task, and 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 Guidelines4/5

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

The description explicitly enumerates when to call the tool: for running CLI/GUI tasks, for queued tasks, and as the manual confirmation entry for terminal GUI tasks with guiStopUnconfirmed. It does not explicitly name alternatives or state when not to use it, so it falls just short of a 5.

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