Skip to main content
Glama

flash_firmware

Destructive

Programs a compiled .elf or .axf firmware image onto an STM32 target, then resets and runs it by default. Set reset_run=false to flash only and halt for breakpoint setup.

Instructions

Flashes a compiled firmware binary to the target. Accepts GCC .elf or Keil .axf. By default it then resets and RUNS the firmware (Keil-style 'Load + Run'). Pass reset_run=false to flash only (e.g. to set breakpoints before the firmware starts). Refuses (elf_layout_unsupported) an image GDB would flash incompletely, such as a Keil ARMCC5 AXF whose RW initializer lies outside its segment; flash its fromelf BIN instead.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
sessionNoOptional debug-session name. Omit for the default target.
file_pathYesAbsolute path to the compiled firmware file (e.g. .elf/.axf).
reset_runNoReset and run after flashing (default true). False = flash only, leave halted.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.15.1

TDQS

A4.3/5.0
Behavior4/5

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

Annotations already flag destructiveHint=true and non-idempotence; the description adds substantial behavior beyond that: default post-flash reset-and-run, the option to leave the target halted, and a named refusal mode (elf_layout_unsupported) with the workaround. It stops short of describing timing, session state effects, or how a failure leaves the target.

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?

Front-loaded with the core action and each subsequent sentence carries new information (formats, default run, opt-out, refusal workaround). Slightly dense and dependent on parenthetical device-tool jargon, but no wasted sentences.

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, non-idempotent single-parameter-ish operation with no output schema, the description covers the action, the default side effect, the opt-out, and one notable failure mode with an alternative. Adequate without over-explaining 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 description coverage is 100%, so the baseline is 3, but the description adds real meaning beyond the schema: why reset_run=false matters (breakpoint setup), what the omitted session defaults to, and which formats file_path accepts. Useful context without re-documenting syntax.

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 (Flashes) and resource (compiled firmware binary) plus supported input formats (.elf/.axf). An agent can immediately tell this is the flash-and-execute path rather than the sibling flash_erase or verify_flash tools.

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

Usage Guidelines4/5

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

Gives clear conditions for the reset_run=false variant ('to set breakpoints before the firmware starts') and for using a fromelf BIN instead of an AXF. It does not explicitly contrast itself with the sibling flash_and_run, so routing between those two is left to inference.

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