readMessages
Read accumulated messages from a WebSocket subscription. Optionally clear buffer after reading or limit to recent N messages. Check connection status (active, reconnecting, closed).
Instructions
读取指定订阅已积累的消息。 默认读取全部并清空缓冲区(clearAfterRead=true);设为 false 可保留消息继续累积。 通过 limit 参数可只取最近 N 条消息。 返回 status 字段可判断连接是否仍然活跃(active / reconnecting / closed)。
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| subscriptionId | Yes | 由 startSubscription 返回的订阅 ID | |
| limit | No | 最多返回最近 N 条消息;不填则返回全部缓冲消息 | |
| clearAfterRead | No | 读取后是否清空缓冲区(默认 true) |