统一接收窗口(持续收流量直到结束)
receiveContinuously captures serial traffic until a byte match, size limit, idle timeout, or budget expires, returning every captured byte with match status and stop reason.
Instructions
持续消费全部到达流量,直到命中 match(字节)、达到 max_bytes、静默 idle_timeout_ms、或 budget_ms 耗尽。结束时不丢弃流量——期间所有字节如实带回,由 matched/stopped_reason 说明命中情况;内容判读交给 agent。start=cursor 从当前游标起;start=flush 先清缓冲(干净窗口)再开始;可选 reset 复位(配合 start=flush 抓启动日志)。抓 boot 示例:receive({start:'flush', reset:'dtr', budget_ms:15000})。
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"connection_id": "<connection_id>"
},
"name": "receive"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| match | No | 出现即停的匹配串(字节级),如 "login:" | |
| reset | No | (start=flush 配合)复位方式,默认 none | |
| start | No | cursor=从当前游标(默认);flush=先清缓冲再开始 | |
| budget_ms | No | 整次观察预算(毫秒),默认 10000 | |
| max_bytes | No | 返回字节上限 | |
| connection_id | Yes | 连接 ID(由 open 返回) | |
| match_encoding | No | match 的编码,默认 utf8 | |
| reset_pulse_ms | No | 复位脉冲保持毫秒数,默认 100 | |
| idle_timeout_ms | No | 静默即停阈值(毫秒),默认 300 |