esp32_hardware_execute
Runs arbitrary I2C, SPI, UART, GPIO, ADC, PWM, and stimulus-capture operations on an ESP32 without a predefined component profile, enabling direct probing and identification of attached hardware.
Instructions
GENERAL-PURPOSE HARDWARE EXECUTION. Runs arbitrary operations you construct against the ESP32 as a physical instrument. Requires NO component profile, NO predefined probe and NO prior identification — this is the path for investigating a component beyond anything anticipated by this MCP. Supports: I2C scan/read/write/write-read with arbitrary bytes, repeated start and inter-phase delay; SPI transfer with arbitrary TX bytes, read length, mode, clock, bit order and CS control; UART write/read/write-read with arbitrary bytes and framing; GPIO configure/read/write/pulse/multi-pin sampling; pulse-width, frequency and edge-timing measurement; ADC sampling with interval and attenuation; PWM stimulus generation; and STIMULUS_CAPTURE, which drives one pin while sampling others on a shared timebase. An operation is refused ONLY when physically invalid on this chip (pin does not exist, is wired to flash, cannot drive an output, parameter out of the silicon's range, conflicting or malformed) — never because it was unanticipated. Raw agent responses are retained verbatim on every operation. A successful operation is OBSERVED evidence: it records what the device did, not what the device is.
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": {
"operations": "<operations>"
},
"name": "esp32_hardware_execute"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| port | No | Serial port (optional) | |
| defaults | No | Bus defaults merged into any operation omitting its own `bus`. Keys: i2c, spi, uart. | |
| timeoutMs | No | Per-operation timeout in ms (optional) | |
| operations | Yes | Operations to run in order. Each has an `op` field selecting the kind. See the RawOperation type for the full shape of each. | |
| repetitions | No | Run the whole sequence this many times, 1-100. Use this to judge stability — a single run cannot establish it. | |
| stopOnError | No | Stop at the first failure instead of continuing (default: false) |