serial_read
Reads serial port data non-blocking with early exit on regex match, idle timeout, or time limit. Returns text and HEX views plus match status.
Instructions
从串口读取数据(非阻塞,三条件提前退出)。 expect:正则,命中立即返回(如 expect="OK|ERROR" 等响应); idle_ms:静默超时(板子说完就走); seconds:总时长上限。返回文本视图 + HEX 视图 + 是否命中。 读到的内容同时累积进会话日志。
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": {
"handle": "<handle>"
},
"name": "serial_read"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| expect | No | ||
| handle | Yes | ||
| idle_ms | No | ||
| seconds | No |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| result | Yes |