micropython_reset_and_capture
Resets a MicroPython device and captures its startup serial output for a set duration, with optional idle timeout and byte limit.
Instructions
デバイスをリセットし、起動直後の出力を一定時間読み取る
Args:
capture_duration: リセット後の読み取り最大秒数
idle_timeout: この秒数だけ無通信なら早期終了
max_bytes: 読み取る最大バイト数。超えると truncated=True
Returns:
ok: リセットと読み取り呼び出しに成功したら True
stdout: 起動後に取得したテキスト
reset_ok: リセット操作自体が成功したら True
truncated: max_bytes で打ち切られたら True
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": {
"capture_duration": "<capture_duration>"
},
"name": "micropython_reset_and_capture"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| max_bytes | No | ||
| idle_timeout | No | ||
| capture_duration | Yes |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| ok | Yes | ||
| error | Yes | ||
| stdout | Yes | ||
| reset_ok | Yes | ||
| truncated | Yes |