Skip to main content
Glama
irrumi
by irrumi

stm32_flash

Flash compiled .elf firmware to STM32 microcontrollers over SWD with STM32 Programmer CLI. Confirm the write to target hardware and reset the device to start running the new firmware.

Instructions

STM32_Programmer_CLI -c port=SWD -w -rst. Requires confirm: true. Default is refuse.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
portNoProgrammer interface port (default: SWD)SWD
resetNoWhether to reset target device after flashing
confirmNoMust pass true to confirm flashing to target hardware
elfPathYesPath to .elf binary or project folder containing Debug/*.elf

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv1.0.0

TDQS

C2.8/5.0
Behavior3/5

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

No annotations are provided, so the description carries the full burden. It does disclose a safety behavior: 'Default is refuse' and confirm must be true, and it exposes a reset flag (-rst). However, it does not mention that flashing overwrites target memory or other potentially destructive side effects, which is a notable gap for a hardware-programming tool.

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 description is extremely compact, conveying the operation and a key safety requirement in two short sentences. However, the command-line snippet is not front-loaded with a plain-language purpose statement, making it less accessible. Still, there is no wasted content.

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

Completeness2/5

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

Given the tool's destructive potential and the presence of many sibling tools, the description is incomplete. It omits prerequisites, side effects, when to invoke it in the workflow, and what happens on success or failure. The confirmation gate is helpful but does not compensate for the missing context around a hardware write operation.

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?

The input schema covers 100% of parameters with descriptions and defaults, so the baseline is 3. The description adds minimal semantic value: it maps port/elf/reset to command-line flags but does not explain parameters beyond what the schema already states. No extra meaning is provided for 'confirm' beyond repeating its importance.

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

Purpose3/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description gives a command-line invocation ('STM32_Programmer_CLI -c port=SWD -w <elf> -rst') which implies writing an ELF to a target, but it does not explicitly state 'flash' or 'program' in natural language. It is specific to STM32 but may be opaque to an agent unfamiliar with STM32_Programmer_CLI flags, so it is more vague than clear.

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

Usage Guidelines2/5

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

The description mentions 'Requires confirm: true' as a necessary condition, but gives no guidance on when to use this tool versus siblings like stm32_build or stm32_generate_code. There is no mention of prerequisites (e.g., a built ELF) or use cases where flashing is appropriate.

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