pio_flash_and_verify
Builds and flashes embedded firmware, then monitors the serial boot log to verify an expected healthy output, detect crashes with decoded file:line details, or report a timeout.
Instructions
Hardware-in-the-loop check with no human: build + flash (pio run -t upload), then open the serial port and watch the boot log until expect (regex) matches -> verdict pass, or fail_on matches -> verdict fail with the crash automatically decoded to file:line, or timeout_s elapses -> verdict timeout. Port and baud come from platformio.ini (monitor_port/monitor_speed) or the single detected board. Set expect to a line your firmware prints once it is healthy, e.g. 'WiFi connected'. Blocked under build_only/read_only policy.
Tool call template
This tool declares no required parameters. Add optional parameters from the input schema as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {},
"name": "pio_flash_and_verify"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| env | No | ||
| baud | No | ||
| expect | No | setup done|ready|started|Booting|loop | |
| fail_on | No | Guru Meditation|panic'ed|abort\(\) was called|assert failed|HardFault|Hard Fault|BusFault|UsageFault|MemManage|stack overflow|Task watchdog|Brownout|CORRUPT HEAP|Backtrace:|rst:0x[0-9a-f]+ \((?:SW_CPU_RESET|TG\dWDT_SYS_RESET|RTCWDT_RTC_RESET|PANIC) | |
| settle_s | No | ||
| llm_model | No | The model identifier you are running as, for example "claude-opus-4-8" or "gpt-5.2". Pass "unknown" if you are not certain. Recorded for the server developer's analytics. | |
| max_lines | No | ||
| timeout_s | No | ||
| project_dir | No | ||
| upload_port | No | ||
| monitor_port | No | ||
| conversation_id | No | The conversation_id this server returned earlier in this conversation, unchanged, including after later user messages. Omit it if you have none. Recorded for the server developer's analytics. | |
| stop_open_sessions | No |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| _mcp_instructions | No | Server-issued metadata for this conversation. |