Skip to main content
Glama

MicroPython firmware update

flash_mpy
Destructive

Flashes MicroPython firmware to a CyberBrick board, writes mpy.img, and reboots the device; requires explicit user approval and confirm=true because the update is destructive.

Instructions

Run a MicroPython firmware update via the app's updateLoaderFirmwareMpy (START_MPY_UPDATE). Writes mpy.img and REBOOTS the board. DESTRUCTIVE — requires confirm=true after explicit user approval. Default path upgrades to the built-in RC MPY (mpyType=1); passing userMpyConfig targets a design MPY. Experimental: the built-in path still needs live validation.

Input Schema

NameRequiredDescriptionDefault
regionNo
targetNoWhich device to target — pass exactly one field. If omitted, the app must know exactly one device; ambiguous or unmatched targets are refused.
confirmYesMust be true. Set it only after the user has explicitly approved this specific upgrade on this specific device.
mpyTypeNo0 = user_mpy (design MPY, requires userMpyConfig), 1 = cb_rc (built-in RC MPY).
designIdNo
checksum0NoMPY checksum for the upgrade check; defaults to empty (built-in path).
userMpyConfigNoDesign MPY config {title, microPython:{uniKey, checkSum0}} — required when mpyType=0.
eraseFirmwareConfigNoAlso erase the board RC config after upgrade (app behavior step 13).

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.4.0

TDQS

A4/5.0
Behavior5/5

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

The annotations already declare destructive=true, non-read-only, non-idempotent, and open-world behavior, but the description adds critical operational context: it writes mpy.img, reboots the board, requires confirm=true after explicit user approval, and warns that the built-in path is experimental pending live validation. These details go meaningfully beyond the annotation flags without contradicting them.

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?

The description is compact and front-loaded: it names the operation, states the destructive consequence, gives the confirm gate, explains the two MPY paths, and adds the experimental caveat. Every sentence carries operational or safety-relevant information.

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

Completeness4/5

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

For a destructive, high-complexity firmware update with nested target parameters and no output schema, the description covers the essential safety and path-selection behavior. It leaves some parameter details to the schema, such as region, designId, and eraseFirmwareConfig, and does not describe success/failure reporting, but the core call context is present.

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 75%, so most parameters are already documented structurally. The description adds useful path-level semantics around mpyType=1 default behavior and userMpyConfig, but it does not explain region or designId and mostly repeats what the schema already says about confirm and mpyType.

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

Purpose4/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: running a MicroPython firmware update via updateLoaderFirmwareMpy / START_MPY_UPDATE. It also clarifies the built-in RC MPY versus design MPY paths. It does not explicitly differentiate this from sibling tools such as flash_firmware, so it stops short of a 5.

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

Usage Guidelines3/5

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

The description implies the tool's use for MicroPython firmware updates and gives prerequisite guidance for confirm=true and explicit user approval. It also explains the default built-in RC path versus userMpyConfig design path. However, it does not explicitly state when to use this tool instead of related siblings like flash_firmware or flash_config.

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