capture_log
Reads ESP-IDF device serial output, waits for ordered regex expectations, detects crashes, and decodes backtraces. Use it to verify boot or test logs and stop on panic or timeout.
Instructions
Read the device console until all expect patterns match, a crash is caught, or time runs out.
Crashes found in the log are parsed and symbolised automatically. Check passed:
true only if every expect pattern matched and no crash was seen.
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": "capture_log"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| elf | No | ||
| baud | No | Default $ESPBAUD or 115200 | |
| port | No | Serial port or URL (rfc2217://host:port). Default $ESPPORT | |
| reset | No | Hard-reset via RTS/EN before capturing, to see boot | |
| expect | No | Regexes that must appear IN ORDER; capture stops when all matched | |
| duration_s | No | Maximum capture time | |
| tail_lines | No | ||
| project_dir | No | ESP-IDF project for backtrace symbolisation | |
| stop_on_panic | No |