Skip to main content
Glama

Burn firmware config to board

flash_config

Writes a firmware configuration to a connected CyberBrick board, overwriting stored settings for exactly one target device; supports saved project flashing via hardware mappings.

Instructions

Write a firmwareConfig to the board. Default: the app's SET_DEVICE_CONFIG file protocol (FILE_INFO(md5,size) → chunked FILE_BLOCK via sendGetMessage) — works for a lone receiver, burns firmwareConfig if given else the current editor config, to exactly one target device (ambiguous or unmatched targets are refused). The device must be connected (else DEVICE_NOT_CONNECTED → call connect_bluetooth). Returns {ok, verified, bytes, chunkSize, blocks, md5, readback} — verified=true when the board reports the written size — or {stage, ...} on failure. Passing hardwareMappings switches to the app's runSendConfigTask (burns a saved project, needs a sender board; never creates a project). That path can also upgrade firmware / MPY / loader first — preview with flash_check and pass confirm=true only after the user approved those upgrades. Executes immediately — OVERWRITES the board's stored config. MUTATING / writes to hardware.

Input Schema

NameRequiredDescriptionDefault
targetNoWhich device to target — pass exactly one field. If omitted, the app must know exactly one device; ambiguous or unmatched targets are refused.
confirmNorunSendConfigTask path only, required true: set only after the user approved the upgrades flash_check reports.
firmwareConfigNoConfig object to burn (defaults to the current editor config). File-protocol path only.
firmwareListIdNorunSendConfigTask path only: saved project id to burn (defaults to the editor's current config id; must exist in project_list).
hardwareMappingsNoOpt into the high-level runSendConfigTask path (requires a sender board).

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.4.0

TDQS

A4.8/5.0
Behavior5/5

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

Goes well beyond the annotations: discloses the refusal behavior for ambiguous/unmatched targets, the error-code-to-remedy mapping, the exact return shape ({ok, verified, bytes, chunkSize, blocks, md5, readback}) with the meaning of verified, the failure shape {stage, ...}, the requirement for a sender board on the second path, and that the second path 'never creates a project'. Safety profile is stated outright ('Executes immediately — OVERWRITES the board's stored config. MUTATING / writes to hardware'), which aligns with readOnlyHint=false; destructiveHint=false is a mild tension with 'OVERWRITES' but not a direct contradiction since the change is a rewrite, not a deletion.

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 and default path are front-loaded, and every sentence carries information (paths, preconditions, return shape, side effects). However, the content is packed into a dense block of parentheticals and arrows, so an agent must parse carefully to separate the two paths; minor structural cost, 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?

For a 5-parameter, nested-schema mutation tool with no output schema, the description covers what is needed: which params belong to which path, the connectivity prerequisite, the confirm approval requirement, the overwrite side effect, the success return fields, and the failure shape. Nothing an agent needs to invoke it safely is missing.

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, but the description adds real routing meaning the schema cannot express: firmwareConfig is 'file-protocol path only' while confirm and firmwareListId are 'runSendConfigTask path only', and hardwareMappings is the flag that opts into that path. It also restates the exactly-one-target/ambiguity rule from the schema rather than adding to it, keeping it short of 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 ('Write a firmwareConfig to the board') and immediately distinguishes two execution paths: the default SET_DEVICE_CONFIG file protocol versus the runSendConfigTask path selected by hardwareMappings. It also separates itself from flash_check (preview), connect_bluetooth (prerequisite), and implicitly from flash_firmware/flash_mpy by saying the config-burn path only 'can also upgrade firmware / MPY / loader first'.

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?

Explicitly names when to use each path ('Default: ...', 'Passing hardwareMappings switches to ...'), the preconditions ('The device must be connected (else DEVICE_NOT_CONNECTED → call connect_bluetooth)'), and the approval gate ('preview with flash_check and pass confirm=true only after the user approved'). Alternatives and exclusions are stated rather than inferred.

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