Skip to main content
Glama

nRF52 Enter UF2 Mode

nrf52_enter_uf2
Destructive

Reboot an nRF52 Meshtastic node into its UF2 bootloader drive and return the mounted drive details, enabling firmware flashing when the device app is still responsive.

Instructions

Reboot an nRF52 node into its bootloader's UF2 drive and return the drive's info.

Sends enter_dfu_mode_request over the phone API, so the app must be running; for a hung app, double-press reset instead. The drive appears within a couple of seconds. The node stays in UF2 mode until a UF2 is written to it or it is power-cycled (uhubctl_cycle). Requires confirm=True, or the user's answer when the client can ask.

Returns {ok, requested, drive}.

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_enter_uf2"
  }
}

Input Schema

NameRequiredDescriptionDefault
portNoThe serial port of a board attached to this host by USB (the UF2 drive mounts here, so `tcp://` cannot work); omit to auto-select the one likely Meshtastic device. Keep passing the same `port` to the other `nrf52_*` tools.
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.7/5.0
Behavior5/5

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

Annotations already flag destructive/non-idempotent/open-world, and the description adds genuinely new behavior: the drive appears within a couple of seconds, the node remains in UF2 mode until a UF2 is written or power is cycled, and the confirm gate (with an interactive fallback when the client can prompt). That is the kind of timing and state-persistence context annotations cannot convey.

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?

Front-loaded with the action and its result, then preconditions, state lifetime, and return shape in that order. No sentence is filler; each contributes a distinct operational fact.

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?

Covers prerequisites, failure-mode alternative, timing, mode persistence, the confirmation requirement, and recovery path, despite an output schema already existing. Nothing needed to invoke a destructive bootloader-entry tool correctly is missing.

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

Parameters3/5

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

Schema coverage is 100%, so both parameters are already documented in detail, including the port requirement that 'tcp://' cannot work and the confirm gating. The description restates the confirm rule and adds no port syntax or selection detail beyond the schema, so the baseline 3 applies.

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 ('Reboot an nRF52 node into its bootloader's UF2 drive') and names the side effect ('return the drive's info'). This is clearly distinguishable from siblings like 'reboot' (plain reboot) or 'nrf52_flash_uf2' (which acts on the drive once mounted).

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?

Gives explicit preconditions ('the app must be running'), an explicit exclusion with an alternative for the failure case ('for a hung app, double-press reset instead'), and the exit path via uhubctl_cycle for power-cycling. An agent knows exactly when this tool applies and what to do when it does not.

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