Skip to main content
Glama

nRF DFU Flash

nrfutil_dfu
Destructive

Flashes a .zip DFU package to an nRF52840 over serial, handling the 1200-baud touch and bootloader wait so firmware can be updated on Meshtastic boards.

Instructions

DFU-flash a .zip package to an nRF52840 via nrfutil dfu serial.

With adafruit-nrfutil the transfer uses --singlebank and fails unless the run printed "Device programmed."; where /dev/serial/by-id exists the tool does the 1200 baud touch itself (dropping DTR) and waits for the bootloader, elsewhere it passes -t 1200. For a board already sitting in serial DFU, use nrfutil_raw with no touch instead. On the Meshtastic bootloader nrf52_flash_uf2 is several times faster; for firmware built from the tree prefer pio_flash. 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>",
      "package_path": "<package_path>"
    },
    "name": "nrfutil_dfu"
  }
}

Input Schema

NameRequiredDescriptionDefault
portYesThe app's serial port; a `/dev/serial/by-id` link works.
confirmNo`True` once the user agreed; omitted, a client that can ask prompts the human.
package_pathYesThe DFU .zip package.

Output Schema

NameRequiredDescriptionDefault

No arguments

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A4.8/5.0
Behavior5/5

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

Annotations already mark the tool as destructive, non-read-only, and non-idempotent, but the description adds substantial operational behavior beyond that: the `--singlebank` transfer constraint, the required 'Device programmed.' success condition, automatic 1200 baud touch handling where `/dev/serial/by-id` exists, bootloader waiting, and `-t 1200` fallback behavior elsewhere.

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?

The purpose is front-loaded and no sentence is wasted, but the middle sentence packs several conditional flashing details into a dense semicolon-separated clause. It remains readable and appropriately sized for a complex hardware flashing tool, though it could be slightly easier to scan.

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?

Given the tool's complexity, destructive nature, and the presence of an output schema and annotations, the description is highly complete. It covers alternatives, confirmation prerequisites, failure conditions, and port-specific behavior without needing to explain return values.

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 schema already documents all three parameters. The description still adds meaning beyond the schema by explaining operational implications of `confirm` and `port`, especially the confirmation fallback and the tool's automatic baud-touch behavior for `/dev/serial/by-id` ports.

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?

The description states a specific verb and resource: 'DFU-flash a .zip package to an nRF52840 via `nrfutil dfu serial`.' It clearly distinguishes this operation from sibling flashing approaches such as `nrfutil_raw`, `nrf52_flash_uf2`, and `pio_flash`, so an agent can identify the tool's role without opening the schema.

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?

The description gives explicit routing guidance: use `nrfutil_raw` when the board is already in serial DFU, `nrf52_flash_uf2` on the Meshtastic bootloader, and `pio_flash` for firmware built from the tree. It also states the confirmation requirement, including the `MESHTASTIC_MCP_CONFIRM=human` case.

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