crosspad_log
Captures simulator or ESP32-S3 serial logs and returns the lines, letting you read device output with optional filtering, timeouts, and boot-reset for debugging firmware.
Instructions
[PC | ESP HW] Capture a log from the PC simulator (target='pc') or from a connected ESP32-S3's serial output (target='idf'), and return the captured lines. target='pc' spawns the built simulator, captures its stdout/stderr and kills it (uses timeout_seconds, max_lines; port and filter must be omitted); target='idf' reads the serial output of a connected ESP32-S3 via pyserial, no TTY needed (uses port, auto-detected when omitted, timeout_seconds, max_lines, filter as a case-insensitive substring, reset_to_boot). Defaults are on the parameters.
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": {
"target": "<target>"
},
"name": "crosspad_log"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| port | No | idf only. Serial port path. Auto-detected if omitted; required when multiple devices connected. MUST be omitted for target=pc. | |
| filter | No | idf only. Case-insensitive substring filter — only matching lines returned. MUST be omitted for target=pc. | |
| target | Yes | 'pc' = run+capture sim binary (uses timeout_seconds?,max_lines? — port/filter MUST be omitted); 'idf' = read serial from connected ESP device (uses port?,timeout_seconds?,max_lines?,filter?,reset_to_boot?). | |
| max_lines | No | Max output lines. Defaults: 200 (pc), 500 (idf). | |
| reset_to_boot | No | idf only. Pulse the device reset (esptool DTR/RTS sequence, works through the STM bridge) before capturing, so the log starts at boot t=0. Use for boot-time profiling. Default false (passive read of the running device). | |
| timeout_seconds | No | Capture duration in seconds. Defaults: 5 (pc), 10 (idf). |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| docs | No | ||
| next | No | ||
| port | No | ||
| error | No | ||
| lines | No | ||
| notice | No | ||
| stderr | No | ||
| stdout | No | ||
| success | Yes | ||
| exe_path | No | ||
| exit_code | No | ||
| truncated | No | ||
| line_count | No | ||
| duration_seconds | No |