Skip to main content
Glama

给会话发消息

piweb_send_message

Send a prompt to a pi-web coding session to resume work and optionally retrieve the final assistant reply after it completes.

Instructions

向一个已有会话发送提示词(等价于在 pi-web 输入框里发消息),让它继续干活。会话没在运行时 pi-web 会自动把它拉起来。默认发完就返回;wait_seconds>0 时会等这一轮跑完并带回最后的助手回复。注意:这会让对方 agent 真正执行操作(改文件、跑命令),发之前确认会话选对了。

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
messageYes要发送的提示词正文
sessionYes会话 id / id 前缀 / 名称
wait_secondsNo等待这一轮结束的秒数,0=不等待(默认),建议 120~300
streaming_behaviorNo会话正在流式输出时:steer=插话纠正,followUp=排队等它说完;不传则由 pi-web 决定

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?

Adds real value beyond the annotations: it discloses the auto-restart behavior, the default non-blocking return, what wait_seconds changes about the response, and warns that the target agent will actually mutate files/run commands. This is meaningful operational context even though the annotations already establish non-read-only/non-destructive.

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-loads the core action, then adds runtime behavior, then the safety warning. It is a bit long but every clause conveys distinct information, with no repetition of the name or title.

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 no output schema, the description explains the two return modes (immediate vs. final assistant reply with wait_seconds). Combined with the 100%-covered schema and annotations, an agent has enough to invoke it safely.

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 four parameters are already documented in the schema. The description restates wait_seconds semantics and notes streaming_behavior defaults to pi-web's decision, adding little beyond what structured data provides; baseline 3 applies.

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?

States a specific verb (发送提示词) and resource (已有会话) and clarifies the equivalence to typing in the pi-web input box. It is clearly separable from read-only siblings like piweb_wait_for_reply and piweb_watch_session.

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 clear operating context: the session is auto-started if not running, default behavior is fire-and-return, and wait_seconds>0 blocks for the turn. It advises confirming the right session before sending, but does not explicitly name alternatives (e.g., wait_for_reply) for retrieving the answer.

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