Skip to main content
Glama

channel_wait

Waits for new messages from a specified peer on a channel without polling the model: catch up on backlog first, then hold a WebSocket subscription until messages arrive.

Instructions

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

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

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.6/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 richly: pure read, no auto-ACK, timeout does not auto-restart the wait, cancel or connection failure ends the subscription, it cannot wake an already-ended Desktop turn, and it specifies a concrete timeout budget formula plus MCP cancel requirements.

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?

Core purpose and mechanism are front-loaded in the first sentence, and subsequent sentences each carry a distinct behavioral caveat (ACK policy, timeout semantics, cancellation, timeout sizing). It is dense but every sentence is load-bearing; minor repetition in the timeout guidance.

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?

Given an output schema exists, return values need not be explained, and the description fully covers the lifecycle of the wait (catch-up, blocking, termination conditions) and the caller-side timeout obligations necessary to invoke it correctly.

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 meaning beyond the schema by relating timeout_seconds and io_timeout_seconds to the required MCP request timeout (> timeout_seconds + 4 * io_timeout_seconds + 5s) and describing the cancel behavior when the client times out early.

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 sentence gives a specific verb (等待/wait) and resource (指定对端的新消息) plus the mechanism: catch-up read first, then WebSocket wait without model polling. This clearly separates it from one-shot siblings like channel_read and polling-based approaches.

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 tells the agent this is a blocking wait with no auto-ACK, implicitly steering away from channel_read_ack, and gives operational guidance about when the returned turn can continue and how to size the MCP request timeout. It stops short of explicitly naming channel_read/channel_unread as the non-blocking alternatives.

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