Skip to main content
Glama

claude_task_status

Query Claude task status, live activity, recent tools, changed files, and full final results with exit code, duration, and cost; cancel running tasks while preserving session_id and checkpoint.

Instructions

查询后台或历史 Claude 任务状态、实时活动、最近工具/改动文件,以及完成后的完整未截断回复、退出码、耗时与费用;也可传 action="cancel" 主动安全暂停(终止进程树)指定或全部运行中任务并保留 session_id 与断点以便随时续跑。

Tool call template

This tool declares no required parameters. Add optional parameters from the input schema as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {},
    "name": "claude_task_status"
  }
}

Input Schema

NameRequiredDescriptionDefault
allNo当 action="cancel" 时设为 true 可一键暂停所有(或指定 cwd 下全部)运行中后台任务。
cwdNo可选工作目录过滤(与 action="cancel" 配合时可限定只暂停当前项目内的任务)。
actionNo可选动作:status(默认,查询状态或拉取结果)或 cancel(主动安全暂停运行中任务并终止进程树止血)。
reasonNo可选暂停说明(如"用户要求先调整需求再继续"),会写入任务断点与看板流水。
task_idNo由 claude_run / claude_resume 转后台返回的 task_id(查询时与 session_id 至少填一个)。
wait_msNo可选等待时长(毫秒,0~150000,默认 0 立即返回)。若任务仍在运行且 wait_ms > 0,最多等待该时长直到完成或返回最新进度。
role_nameNo可选按成员职能名过滤(如"前端开发"),配合 action="cancel" 精准暂停指定成员。
session_idNo可选按 Claude session_id 查询或暂停该会话最近一次任务。

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv2.0.1

TDQS

A4/5.0
Behavior4/5

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

With no annotations at all, the description carries the full burden and does reasonably well: it discloses that cancel terminates the process tree (an explicitly destructive act) and mitigates it by preserving session_id and the breakpoint for resumption. It also describes the return payload (untruncated reply, exit code, duration, cost). It says nothing about permissions, concurrency, or what happens to already-completed tasks when cancel is issued.

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?

A single dense sentence, semicolon-separated, with the primary query purpose front-loaded and the secondary cancel mode after it. Every clause adds information (return fields, cancel behavior, resume guarantee) with no 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?

There is no output schema, and the description compensates by enumerating the return values an agent would care about (untruncated reply, exit code, duration, cost, live activity). Combined with 100% schema coverage on the 8 parameters, an agent has enough to call this correctly. It could go further on cancel side effects for tasks in flight, but the core is complete.

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 description coverage is 100%, so all eight parameters, including the status/cancel enum, are already documented in the schema. The description reinforces the action="cancel" semantics and the resume-preservation guarantee but adds no syntax, defaults, or edge-case guidance beyond the structured fields. Baseline 3 applies when the schema does the heavy lifting.

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 pairs a specific verb (查询) with a specific resource (后台或历史 Claude 任务状态) and enumerates what the tool surfaces: real-time activity, recent tool use and changed files, the full untruncated reply, exit code, duration and cost. It also covers the second mode (action="cancel"). It does not name any sibling tool (claude_run, claude_resume, claude_list_sessions) to explicitly distinguish itself, which keeps it below a 5.

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 clearly separates the two usage modes: default querying of status/results and action="cancel" for safely pausing running tasks. It states the cancel mode preserves session_id and the breakpoint so the task can be resumed later, which gives the agent a clear condition for choosing that path. It stops short of naming alternatives or stating when not to use the tool.

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