Skip to main content
Glama

查看 agent 运行状态

piweb_agent_state
Read-only

Monitor pi coding agent sessions: see running/waiting sessions globally, or inspect a session's streaming state, context usage, model, and queued messages.

Instructions

不带 session 时给全局快照(哪些会话在跑/等待输入);带 session 时给该会话的详细状态(是否流式中、上下文占用、模型、排队消息)。

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
sessionNo会话 id / 名称;省略则看全局

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv1.1.0

TDQS

A4.1/5.0
Behavior4/5

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

Annotations already declare readOnlyHint=true and openWorldHint=true, so safety is covered; the description goes further and itemizes what state is exposed (streaming or not, context occupancy, model, queued messages). It does not discuss freshness, cost, or whether the snapshot is cached, which keeps it out of 5 territory.

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?

One compact sentence with the two branches front-loaded in the order the agent will decide between them; every clause carries information and there is no boilerplate.

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 carries the return-value burden and does name the fields of interest (running/waiting, streaming, context usage, model, queued messages). It stops short of exact field names or shapes, but is sufficient for a read-only, single-parameter state query.

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

Parameters4/5

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

Schema coverage is 100% and the single param is self-documenting, so the baseline would be 3. The description earns extra credit by pairing each parameter state with a distinct result shape (global snapshot vs. detailed per-session state), which tells the agent why to pass or omit session rather than just how.

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?

States a specific resource (agent run state) and explicitly splits behavior into two modes: no-session global snapshot vs. per-session detail. It is clear what the tool returns, but it never distinguishes itself from overlapping siblings such as piweb_status, piweb_list_sessions, or piweb_get_session, so an agent must still infer which one to pick.

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?

Gives explicit mode-selection guidance: omit session for the global view of running/blocked conversations, pass session for one session's detail. There are no exclusions or named alternatives, so it falls short of routing the agent against competing sibling tools.

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