Skip to main content
Glama

会话分诊(谁在等我 / 谁半途死了)

piweb_triage
Read-only

Triage pi coding agent sessions by last message, hanging tool calls, and inactivity to find conversations awaiting your reply, stopped midway, or stalled. Returns reproducible evidence per session.

Instructions

不经过模型,纯按「最后一条消息是谁 + 是否有悬挂的工具调用 + 多久没动」把会话分诊成:🟠等我回答(扩展弹窗)、❓可能在问我(最后一条助手消息带问号)、⚠️半途停下(最后一轮没有助手收尾)、💤停滞(半途停下且很久没动)、🟢在跑、💬等我下一步。每条都给判定依据,可复现、可核查。这是回答「现在还有多少对话在等我」最快的一招。默认只看最近 3 天有过活动的会话。

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
cwdNo只看某个项目目录(前缀匹配)
limitNo最多分诊多少个会话,默认 40(按最近活动取)
sinceNo只看该时间之后有更新的,默认 3d;传 all 表示不限时间
per_groupNo每组最多列几个,默认 8
include_emptyNo是否包含没有任何消息的空会话,默认 false
stalled_hoursNo多久没动算「停滞」,默认 6 小时
include_subagentsNo是否包含子代理会话,默认 false

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv1.1.0

TDQS

A4/5.0
Behavior4/5

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

Beyond readOnlyHint/openWorldHint, the description discloses the important behavioral trait that triage is rule-based and model-free ('不经过模型'), so results are deterministic, and that every bucket entry carries its justification ('可复现、可核查'). It does not cover ordering within groups, output size limits, or whether subagent sessions skew counts beyond the schema default.

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?

Front-loaded with the mechanism and the bucket taxonomy, then the use-case pitch and the default window — order is sensible and the emoji list earns its space as the output contract. It is a dense run-on with some redundancy between the bucket definitions and the '这是…最快的一招' closing line.

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?

Seven all-optional parameters and no output schema, but the description supplies the missing output shape (six named groups plus per-entry evidence) and the default scoping, which is exactly what an agent needs to call it blind. Nothing material is left dangling.

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 every parameter is already documented, and the description adds only the default 3-day window and the notion that 'stalled' combines an unfinished turn with idle time (tying loosely to stalled_hours). It says nothing about per_group, cwd prefix matching, or include_empty/include_subagents behavior beyond what the schema states.

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 states a concrete verb (triage) and the exact rule set applied (last message author + dangling tool calls + idle time), then enumerates the six output buckets with emoji labels. An agent knows precisely what comes back, but no sibling tool (e.g. piweb_list_unread or piweb_agent_state, which plausibly overlap) is named to draw the boundary.

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?

It explicitly recommends itself for one question — 'how many conversations are waiting on me' — and calls itself the fastest option, which is usable routing guidance. It also states the default 3-day activity window as a usage constraint, but gives no when-not conditions or named alternatives for the overlapping wait/unread tools.

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