Skip to main content
Glama

nRF52 Back Up Firmware

nrf52_backup_firmware
Read-onlyIdempotent

Copies the installed application from a board's UF2 drive into the data directory before flashing, returning the backup path for byte-for-byte restoration later.

Instructions

Copy CURRENT.UF2 (the installed application) off a board's UF2 drive into the data dir.

The dump restores byte-for-byte with nrf52_flash_uf2; take one before flashing. Reads only; the board stays in UF2 mode. Returns the backup's path.

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

Input Schema

NameRequiredDescriptionDefault
portNoThe board's app port, ideally its `/dev/serial/by-id` path; omit when only one UF2 drive is mounted.

Output Schema

NameRequiredDescriptionDefault

No arguments

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A4.5/5.0
Behavior4/5

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

Annotations already declare readOnlyHint, idempotentHint, and destructiveHint=false, so the safety profile is covered. The description adds non-obvious operational facts beyond that: the board remains in UF2 mode afterward and the dump is byte-for-byte restorable. The return-path sentence is partially redundant given the output schema exists.

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?

Four short sentences, each doing distinct work: what is copied, how it is used, the safety/state consequence, and the return value. The core action is front-loaded with no filler.

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?

A low-complexity, single-optional-param read tool with an output schema and full annotation coverage. The description supplies the one thing structured fields cannot: that this should be run before flashing and that the dump is fidelity-preserving.

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 description coverage is 100% and the single 'port' parameter is documented there with its /dev/serial/by-id preference and the omit-when-one-drive condition. The description's 'a board's UF2 drive' hints at target selection but adds no syntax or disambiguation beyond the schema, so 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: 'Copy CURRENT.UF2 (the installed application) off a board's UF2 drive into the data dir.' It also positions itself against the sibling that consumes the artifact ('restores byte-for-byte with nrf52_flash_uf2'), so an agent can distinguish backup from flash without opening either 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?

Gives an explicit when: 'take one before flashing.' It also names the complementary tool (nrf52_flash_uf2) and the relationship between them, so the selection decision is unambiguous. No plausible alternative is left unaddressed for this operation.

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