Skip to main content
Glama

等待会话这一轮结束并取回复

piweb_wait_for_reply

Poll a Pi Web session until its current run finishes streaming, then return the final assistant reply. Use after sending a message without waiting to collect results later.

Instructions

轮询某个会话,等它这一轮跑完(不再流式输出),然后返回最后的助手回复文本。适合先 piweb_send_message 不等、之后再来收结果。

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
sessionYes会话 id / 名称
max_charsNo回复文本截断长度,默认 20000
poll_secondsNo轮询间隔,默认 3
timeout_secondsNo最长等待秒数,默认 180

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?

Annotations are minimal (readOnlyHint=false, openWorldHint=true), so the description carries most of the burden and does add real value: it discloses that the tool polls, blocks until streaming output stops, and returns only the last assistant reply. It does not say what happens on timeout (partial reply? error?) or whether the wait consumes/marks the reply, which are the remaining behavioral gaps.

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?

Two sentences, no filler, and the mechanism (poll until streaming ends, return final reply) is front-loaded before the recommended workflow. Every clause earns its place.

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?

No output schema exists, and the description does cover the return value ('final assistant reply text'), which is the key missing piece. What it omits is failure/timeout behavior for a long-polling tool with a configurable timeout, which an agent would want to know before relying on it.

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 session, max_chars, poll_seconds and timeout_seconds are already documented with types, bounds and defaults. The description adds no parameter-level detail (e.g., interaction between timeout_seconds and poll_seconds, or what max_chars truncation does to the reply). 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?

States a specific verb+resource: poll a session until its current round finishes streaming, then return the final assistant reply text. The blocking/polling semantics are clear. It doesn't explicitly distinguish itself from the sibling piweb_watch_session, which is a plausible alternative for the same session, so it falls short of 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?

Explicitly prescribes the workflow: call piweb_send_message without waiting, then come back to this tool to collect the result. That names both the pattern and the companion tool. It gives no exclusion guidance (e.g., when to prefer piweb_watch_session or piweb_list_unread instead), so it is clear context without alternatives.

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