micropython_read_stream
Read stream output from a connected MicroPython device for a set duration, stopping early on idle timeout or byte limit.
Instructions
接続中のデバイスから一定時間ストリーム出力を読み取る
Args:
duration: 読み取りを続ける最大秒数
idle_timeout: この秒数だけ無通信なら早期終了
max_bytes: 読み取る最大バイト数。超えると truncated=True
Returns:
ok: 成功 True
stdout: 読み取ったテキスト
truncated: max_bytes で打ち切られたら True
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": {
"duration": "<duration>"
},
"name": "micropython_read_stream"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| duration | Yes | ||
| max_bytes | No | ||
| idle_timeout | No |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| ok | Yes | ||
| error | Yes | ||
| stdout | Yes | ||
| truncated | Yes | ||
| bytes_read | Yes |