Skip to main content
Glama

channel_wait

Waits for new messages from a specified peer on a channel, backfilling existing messages then listening via WebSocket without polling until messages arrive or timeout.

Instructions

等待指定对端的新消息:先补读,随后以 WebSocket 等待,不轮询模型。

纯读、不自动 ACK。返回正文后,等待此工具的当前回合可继续;不能唤醒已经结束 的 Desktop 回合。超时不自动重开等待。取消或连接故障会结束本次订阅。 调用方应让 MCP 请求超时大于 timeout_seconds + 4 * io_timeout_seconds + 5 秒。 客户端若提前超时,须发送 MCP cancel 或关闭连接;仅本地超时服务端无法感知。

返回 status=messages 或 timeout,附正文列表、has_more、next_cursor 与 delivery_source(replay=初始补读,event=WS 事件后补读,timeout_read=到期 后的末次补读,可为空)。游标失效直接报错,不静默跳页。

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
limitNo最多返回的消息数,范围 1-200,默认 50。
sinceNo首次调用的 ISO 8601 时间下界;与 cursor 至少传一个,续读使用 cursor。
cursorNo上次实际处理页的 next_cursor;按数据库插入序续读,不用时间戳替代。
readerYes收件角色标识,如 leader-codex,不是 session_id。
senderYes对端角色标识,如 leader-cc;不能与 reader 相同。
channelYes专线频道名,如 team:aiteam-os-bridge。
project_idNo项目 id;留空按既有 cwd 规则解析,解析不到则拒绝。
timeout_secondsNo等待新消息的秒数,范围 (0, 300],默认 45;不含连接与补读开销。
io_timeout_secondsNo连接、订阅确认和单次 HTTP 读取各自的秒数预算,范围 (0, 60],默认 10。

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Schema Changelog

Changes observed during successful MCP inspections.

  1. Addedv1.12.3

TDQS

A4.7/5.0
Behavior5/5

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

With no annotations, the description carries the full burden and does so: it declares this is read-only and does not auto-ACK, describes timeout/cancel/connection-failure endings, warns that local-only client timeouts are invisible to the server, and even gives the MCP-request timeout formula (timeout_seconds + 4*io_timeout_seconds + 5). This is exactly the operational context an agent needs to invoke it safely.

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?

Four tight paragraphs, front-loaded with purpose, then behavior, then the actionable timeout budget rule, then return/error semantics. Despite the density every sentence carries distinct information, so nothing reads as padding.

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?

For a 9-parameter blocking tool with no annotations but with an output schema, the description covers what the schema and output cannot: read-only guarantee, blocking lifecycle, cancellation/failure endings, timeout composition, and durable error behavior on bad cursors. Nothing an agent needs to call it correctly is missing.

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%, so the baseline is 3, but the description adds real value: it explains how timeout_seconds and io_timeout_seconds compose into the caller's overall timeout budget, clarifies that cursor is the resume mechanism (not a timestamp), and states that an invalid cursor errors loudly rather than silently skipping pages.

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?

The opening clause states a specific verb (等待) and resource (指定对端的新消息) plus the mechanism (先补读, 随后 WebSocket), which cleanly separates it from poll-style siblings like channel_read / channel_unread / channel_mentions. An agent can tell this is a blocking subscription-wait tool without opening the schema.

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 gives clear context on when the tool is appropriate (waiting for new peer messages, replay-then-subscribe) and important exclusions (cannot wake an already-finished Desktop turn, timeout does not auto-reopen the wait). However it never names a sibling alternative for the non-blocking case, so the routing guidance is implied rather than explicit.

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

Deploy Server

Other Tools