Skip to main content
Glama

nRF52 Factory Erase

nrf52_factory_erase
Destructive

Wipe an nRF52 node’s saved configuration, node database, keys, and BLE bonds through its UF2 bootloader after confirmation, leaving firmware installed; unsupported bootloaders are refused.

Instructions

Wipe an nRF52 node's saved data (config, node DB, keys, BLE bonds) through its bootloader, leaving the firmware installed.

Needs a bootloader whose INFO_UF2.TXT has a Factory-Erase: line (Meshtastic bootloader 0.9.2-OTAFIX2.4 and later); older ones silently ignore the file, so this refuses them. The board must be in UF2 mode and returns to it after the erase. Requires confirm=True, or the user's answer when the client can ask (always, with MESHTASTIC_MCP_CONFIRM=human).

Tool call template

This tool declares no required parameters. Add optional parameters from the input schema as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {},
    "name": "nrf52_factory_erase"
  }
}

Input Schema

NameRequiredDescriptionDefault
portNoThe board's app port, ideally its `/dev/serial/by-id` path; omit when only one UF2 drive is mounted.
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.6/5.0
Behavior5/5

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

Annotations already declare destructiveHint=true and non-idempotent, and the description goes well beyond them: it names what is destroyed, states the tool refuses unsupported bootloaders (older ones 'silently ignore the file'), and notes the board returns to UF2 mode after the erase. It also discloses the confirmation path including the MESHTASTIC_MCP_CONFIRM=human override.

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

Conciseness4/5

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

Front-loaded with the action and its scope, followed by prerequisites and then confirmation rules in a logical order with no filler. The parenthetical version strings and env-var clause make it dense, but each detail is decision-relevant rather than redundant.

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 destructive hardware tool this covers everything an agent needs: what is erased, what survives, the hardware/firmware prerequisite, the failure mode when unmet, and the confirmation protocol. Return values need not be explained because an output schema exists.

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; the description adds real meaning by tying `port` to UF2-mode selection and explaining that `confirm` can be satisfied either explicitly or by a client-side human prompt, including the environment-variable behavior not present in the schema. Some of this overlaps the schema's own confirm description, keeping it from a 5.

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 ('Wipe an nRF52 node's saved data') and enumerates the scope (config, node DB, keys, BLE bonds). The clause 'leaving the firmware installed' explicitly separates it from flashing or a full firmware erase, so an agent can distinguish it from siblings like nrf52_flash_uf2 or esptool_erase_flash.

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

Usage Guidelines4/5

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

Gives concrete preconditions: bootloader must expose a `Factory-Erase:` line (version floor stated), board must be in UF2 mode, and confirm=True or a human answer is required. It does not explicitly say when to prefer this over factory_reset or nrfutil_dfu, so it stops short of full alternative routing.

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