ESPTool Raw Pass-Through
esptool_rawRuns raw esptool commands against ESP devices for advanced firmware flashing, erasing, and chip operations; destructive subcommands require explicit confirmation.
Instructions
Pass-through to esptool.
Destructive subcommands (write_flash, erase_flash, erase_region, merge_bin) require
confirm=True, or the user's answer when the client can ask; other subcommands run
without asking. Prefer the high-level pio_flash / erase_and_flash / update_flash
tools where possible; they know board-specific offsets and protocols.
Security: args is passed directly to the esptool binary. All arguments must come from
a trusted source; do not allow untrusted content (e.g. mesh packet payloads) to flow
into argument lists.
Returns {exit_code, stdout, stderr, stdout_tail, stderr_tail, duration_s}.
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": {
"args": "<args>"
},
"name": "esptool_raw"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| args | Yes | The esptool arguments, from a trusted source only. | |
| port | No | Serial port, passed as `--port`; omit to leave it to `args` or esptool. | |
| confirm | No | `True` once the user agreed; omitted, a client that can ask prompts the human. Only destructive subcommands ask. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||