{"at":"2026-11-23T03:20:29.983Z","dir":"sent","era":"server_discover","message":{"id":1,"jsonrpc":"2.0","method":"server/discover","params":{"_meta":{"io.modelcontextprotocol/clientCapabilities":{},"io.modelcontextprotocol/clientInfo":{"name":"didrun-lab","version":"0.1.0"},"io.modelcontextprotocol/protocolVersion":"2026-07-28"}}}}
{"at":"2026-11-23T03:20:30.409Z","dir":"received","era":"server_discover","message":{"error":{"code":-32601,"message":"Method not found"},"id":1,"jsonrpc":"2.0"}}
{"at":"2026-11-23T03:20:30.510Z","dir":"sent","era":"initialize","message":{"id":1,"jsonrpc":"2.0","method":"initialize","params":{"capabilities":{},"clientInfo":{"name":"didrun-lab","version":"0.1.0"},"protocolVersion":"2025-11-25"}}}
{"at":"2026-11-23T03:20:30.905Z","dir":"received","era":"initialize","message":{"id":1,"jsonrpc":"2.0","result":{"capabilities":{"prompts":{},"resources":{},"tools":{}},"protocolVersion":"2025-11-25","serverInfo":{"name":"esp32sim-mcp","version":"0.2.6"}}}}
{"at":"2026-11-23T03:20:30.905Z","dir":"sent","era":"initialize","message":{"jsonrpc":"2.0","method":"notifications/initialized"}}
{"at":"2026-11-23T03:20:30.905Z","dir":"sent","era":"initialize","message":{"id":2,"jsonrpc":"2.0","method":"tools/list","params":{}}}
{"at":"2026-11-23T03:20:30.908Z","dir":"received","era":"initialize","message":{"id":2,"jsonrpc":"2.0","result":{"tools":[{"description":"Boots and simulates ESP32 firmware in a local emulator without hardware. Captures UART logs, FreeRTOS asserts, memory faults, and stop reason.","inputSchema":{"properties":{"appBin":{"description":"Direct path to the application binary (.bin).","type":"string"},"board":{"description":"Board model: S3 'atech14' (default), 'waveshare-lcd4b', 'waveshare-amoled18-v2', 'waveshare-cam'; C6 'waveshare-c6-lcd147'; ESP32 'ttgo-tdisplay', 'esp32dev-loopback'; 'none' for a bare module. Omit on the C3, which has no boards. See sim_list_boards.","type":"string"},"bootloaderBin":{"description":"Direct path to bootloader.bin (needed with appBin for a real ROM boot).","type":"string"},"chip":{"description":"Target chip family. Default is s3 (ESP32-S3).","enum":["esp32","s3","c3","c6"],"type":"string"},"console":{"description":"Console source to capture (default: both = UART0 + USB-Serial/JTAG). Lines ESP-IDF mirrors on both consoles are shown once.","enum":["uart0","usb","both","all","none"],"type":"string"},"maxSeconds":{"description":"Maximum emulated time in seconds (default: 10s). Emulation usually runs faster than real time.","type":"number"},"projectDir":{"description":"Path to the ESP-IDF project root or build folder. If omitted, uses current working directory.","type":"string"},"ptableBin":{"description":"Direct path to partition-table.bin (needed with appBin for a real ROM boot).","type":"string"},"stopAfterExceptions":{"description":"Stop after N CPU exceptions (unset by default). Counts every exception, including the window overflow/underflow ones Xtensa firmware takes constantly, so it is a debugging aid, not a crash detector. Panics are detected from the log regardless.","type":"number"},"wifi":{"description":"Attach a virtual access point with DHCP/DNS/NAT. Spec like 'ssid=demo,psk=secret' (keys: ssid, psk, chan, bssid), or a bare SSID for an open network. Station gets 10.0.2.15.","type":"string"}},"type":"object"},"name":"sim_run"},{"description":"Simulates hardware interactions (button presses, GPIO levels, rotary encoder turns, touch, UART/console input) at specific emulated timestamps, capturing interactive firmware behavior.","inputSchema":{"properties":{"appBin":{"description":"Direct path to the application binary (.bin).","type":"string"},"board":{"description":"Board model: S3 'atech14' (default), 'waveshare-lcd4b', 'waveshare-amoled18-v2', 'waveshare-cam'; C6 'waveshare-c6-lcd147'; ESP32 'ttgo-tdisplay', 'esp32dev-loopback'; 'none' for a bare module. Omit on the C3, which has no boards. See sim_list_boards.","type":"string"},"bootloaderBin":{"description":"Direct path to bootloader.bin (needed with appBin for a real ROM boot).","type":"string"},"chip":{"description":"Target chip family. Default is s3 (ESP32-S3).","enum":["esp32","s3","c3","c6"],"type":"string"},"events":{"description":"Host actions at emulated times.","items":{"properties":{"action":{"enum":["press","release","gpio","knob","serial","uart","touch","stop"],"type":"string"},"data":{"description":"serial: text into the USB-Serial/JTAG console. uart: one line into the UART receive FIFO.","type":"string"},"direction":{"description":"knob: encoder direction.","enum":["cw","ccw"],"type":"string"},"down":{"description":"touch: true presses (default), false releases.","type":"boolean"},"durationMs":{"description":"press: how long the button is held (e.g. 150).","type":"number"},"level":{"description":"gpio: level to drive.","enum":[0,1],"type":"number"},"pin":{"description":"gpio: pin number to drive.","type":"number"},"port":{"description":"uart: UART port (default 0).","enum":[0,1],"type":"number"},"steps":{"description":"knob: number of detents.","type":"number"},"target":{"description":"press/release: button name for the board ('btn1', 'btn2', 'sw', 'boot', 'right') or a GPIO number.","type":"string"},"time":{"description":"Emulated second when the event fires (e.g. 1.5).","type":"number"},"x":{"description":"touch: x coordinate.","type":"number"},"y":{"description":"touch: y coordinate.","type":"number"}},"required":["time","action"],"type":"object"},"type":"array"},"maxSeconds":{"description":"Total simulation duration in seconds (default 15).","type":"number"},"projectDir":{"description":"Path to the ESP-IDF project root or build folder. If omitted, uses current working directory.","type":"string"},"ptableBin":{"description":"Direct path to partition-table.bin (needed with appBin for a real ROM boot).","type":"string"},"scriptContent":{"description":"Raw esp32sim script text instead of events (e.g. \"1.5 press btn1 150\\n3.0 stop\").","type":"string"},"wifi":{"description":"Attach a virtual access point with DHCP/DNS/NAT. Spec like 'ssid=demo,psk=secret' (keys: ssid, psk, chan, bssid), or a bare SSID for an open network. Station gets 10.0.2.15.","type":"string"}},"type":"object"},"name":"sim_script"},{"description":"Runs firmware in simulation and asserts that specific text or regex patterns appear on UART. Ideal for automated unit & integration testing in a Red-Green-Refactor agent loop.","inputSchema":{"properties":{"appBin":{"description":"Direct path to the application binary (.bin).","type":"string"},"board":{"description":"Board model: S3 'atech14' (default), 'waveshare-lcd4b', 'waveshare-amoled18-v2', 'waveshare-cam'; C6 'waveshare-c6-lcd147'; ESP32 'ttgo-tdisplay', 'esp32dev-loopback'; 'none' for a bare module. Omit on the C3, which has no boards. See sim_list_boards.","type":"string"},"bootloaderBin":{"description":"Direct path to bootloader.bin (needed with appBin for a real ROM boot).","type":"string"},"chip":{"description":"Target chip family. Default is s3 (ESP32-S3).","enum":["esp32","s3","c3","c6"],"type":"string"},"events":{"description":"Optional interaction events before checking patterns.","items":{"properties":{"action":{"enum":["press","release","gpio","knob","serial","uart","touch","stop"],"type":"string"},"data":{"description":"serial: text into the USB-Serial/JTAG console. uart: one line into the UART receive FIFO.","type":"string"},"direction":{"description":"knob: encoder direction.","enum":["cw","ccw"],"type":"string"},"down":{"description":"touch: true presses (default), false releases.","type":"boolean"},"durationMs":{"description":"press: how long the button is held (e.g. 150).","type":"number"},"level":{"description":"gpio: level to drive.","enum":[0,1],"type":"number"},"pin":{"description":"gpio: pin number to drive.","type":"number"},"port":{"description":"uart: UART port (default 0).","enum":[0,1],"type":"number"},"steps":{"description":"knob: number of detents.","type":"number"},"target":{"description":"press/release: button name for the board ('btn1', 'btn2', 'sw', 'boot', 'right') or a GPIO number.","type":"string"},"time":{"description":"Emulated second when the event fires (e.g. 1.5).","type":"number"},"x":{"description":"touch: x coordinate.","type":"number"},"y":{"description":"touch: y coordinate.","type":"number"}},"required":["time","action"],"type":"object"},"type":"array"},"maxSeconds":{"description":"Max emulated seconds to wait for patterns (default 10).","type":"number"},"ordered":{"description":"Whether patterns must appear in exact chronological sequence (default: true).","type":"boolean"},"patterns":{"description":"Expected console output. Plain text matches as a substring of a line (\"Counter: 5\"); write a regular expression between slashes (\"/Counter: \\\\d+/\", \"/wifi.*connected/i\").","items":{"type":"string"},"type":"array"},"projectDir":{"description":"Path to the ESP-IDF project root or build folder. If omitted, uses current working directory.","type":"string"},"ptableBin":{"description":"Direct path to partition-table.bin (needed with appBin for a real ROM boot).","type":"string"},"wifi":{"description":"Attach a virtual access point with DHCP/DNS/NAT. Spec like 'ssid=demo,psk=secret' (keys: ssid, psk, chan, bssid), or a bare SSID for an open network. Station gets 10.0.2.15.","type":"string"}},"required":["patterns"],"type":"object"},"name":"sim_expect"},{"description":"Captures a snapshot image of the virtual LCD/TFT display buffer at a specified emulated time.","inputSchema":{"properties":{"appBin":{"description":"Direct path to the application binary (.bin).","type":"string"},"board":{"default":"atech14","description":"Board with a display: 'atech14', 'waveshare-lcd4b', 'waveshare-amoled18-v2' (S3), 'waveshare-c6-lcd147' (C6), 'ttgo-tdisplay' (ESP32).","type":"string"},"bootloaderBin":{"description":"Direct path to bootloader.bin (needed with appBin for a real ROM boot).","type":"string"},"chip":{"description":"Target chip family. Default is s3 (ESP32-S3).","enum":["esp32","s3","c3","c6"],"type":"string"},"projectDir":{"description":"Path to the ESP-IDF project root or build folder. If omitted, uses current working directory.","type":"string"},"ptableBin":{"description":"Direct path to partition-table.bin (needed with appBin for a real ROM boot).","type":"string"},"timeSeconds":{"default":3,"description":"Emulated second at which to take the screenshot.","type":"number"}},"type":"object"},"name":"sim_screenshot"},{"description":"Returns the catalogue of all supported ESP32 chips, boards, displays, peripherals and capabilities.","inputSchema":{"properties":{"chip":{"description":"Filter boards by chip family.","enum":["esp32","s3","c3","c6"],"type":"string"}},"type":"object"},"name":"sim_list_boards"},{"description":"Validates local environment: checks if esp32sim binary is installed, checks Rust/Cargo, and provides setup instructions.","inputSchema":{"properties":{},"type":"object"},"name":"sim_doctor"}]}}}
