Skip to main content
Glama

ESPTool Erase Flash

esptool_erase_flash
Destructive

Performs a full-chip ESP32 flash erase to recover devices stuck in an abnormal state; requires explicit confirmation and leaves the device unbootable until firmware is flashed.

Instructions

Full-chip erase via esptool erase_flash. Leaves the device unbootable.

Prefer erase_and_flash which also writes firmware. Use this only for recovery when a device is in a weird state. Requires confirm=True, or the user's answer when the client can ask (always, with MESHTASTIC_MCP_CONFIRM=human).

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": {
      "port": "<port>"
    },
    "name": "esptool_erase_flash"
  }
}

Input Schema

NameRequiredDescriptionDefault
portYesThe ESP32's serial port.
confirmNo`True` once the user agreed; omitted, a client that can ask prompts the human.

Output Schema

NameRequiredDescriptionDefault

No arguments

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A4.9/5.0
Behavior5/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

Annotations already declare destructiveHint=true and readOnlyHint=false, but the description adds the concrete consequence ('Leaves the device unbootable') and the confirmation contract (confirm=True, client prompt, or the MESHTASTIC_MCP_CONFIRM=human env override) — exactly the behavior an agent cannot infer from annotations.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

Three short sentences ordered by importance: what it does, the damage, the safer alternative, then the prerequisite. No repetition of the title or schema.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness5/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

For a single-action destructive tool with an output schema present, the description covers the risk, the alternative, and the gating requirement — nothing an agent needs to call it safely is missing.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters4/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema coverage is 100% so the baseline is 3, but the description adds real meaning to `confirm`: it distinguishes the self-asserted True from the client-prompt path and names the environment variable that forces human confirmation.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

States a specific verb and resource ('Full-chip erase via `esptool erase_flash`') and immediately names the consequence, so the agent knows exactly what operation is being invoked and how it differs from the sibling `erase_and_flash`.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines5/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

Explicitly routes away from this tool ('Prefer `erase_and_flash`') and narrows the use case to recovery of a device in a weird state, which is a when-to-use and a when-not-to-use in two sentences.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.