micropython_read_until
Read connected device output until a specified substring appears, using timeout and max byte limits.
Instructions
接続中のデバイス出力を、指定文字列が現れるまで読み取る
Args: pattern: 検出したい文字列。正規表現ではなく部分文字列 timeout: 待機する最大秒数 max_bytes: 読み取る最大バイト数
Returns:
ok: 成功 True
matched: pattern を検出したら True
stdout: 読み取ったテキスト
bytes_read: 実際に読んだバイト数
error: エラー時のメッセージ
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": {
"pattern": "<pattern>",
"timeout": "<timeout>"
},
"name": "micropython_read_until"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| pattern | Yes | ||
| timeout | Yes | ||
| max_bytes | No |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| ok | Yes | ||
| error | Yes | ||
| stdout | Yes | ||
| matched | Yes | ||
| bytes_read | Yes |