Skip to main content
Glama
brovk2008

STM32Cube-MCP

by brovk2008

stm32_flash_firmware

Flash compiled firmware (.elf, .hex, or .bin) to an STM32 microcontroller via SWD/JTAG, with optional verify, reset, and immediate execution.

Instructions

Flashes firmware (.elf, .hex, or .bin) onto the target STM32 microcontroller.

Args: file_path: Path to compiled binary (.elf, .hex, .bin). address: Flash start address (required for raw .bin files, e.g. '0x08000000'). verify: Verify flash write after programming. reset: Reset target MCU after programming. port: Debug interface ('SWD', 'JTAG', 'URT', 'USB1'). freq_khz: Debug probe clock frequency in kHz. start_run: Start firmware execution immediately.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
portNoSWD
resetNo
verifyNo
addressNo
freq_khzNo
file_pathYes
start_runNo

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
resultYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv1.0.0

TDQS

A4.2/5.0
Behavior4/5

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

With no annotations provided, the description carries the full burden of behavioral disclosure. It transparently lists available actions: verification ('verify: Verify flash write after programming'), reset ('reset: Reset target MCU after programming'), and execution start ('start_run: Start firmware execution immediately'). It also notes that address is required for raw .bin files, implying potential danger if omitted. This covers core behaviors though it does not explicitly warn about overwriting existing firmware or prerequisites like probe connection.

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 well-structured: a one-line purpose followed by a parameter list. It is appropriately sized for seven parameters, with no wasted words. Each parameter gets a concise, informative sentence. It is slightly long but necessary given the number of fields, and it front-loads the core purpose.

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?

Given the complexity (7 parameters, no annotations) and the existence of an output schema (per context signal), the description covers all parameter semantics and gives enough context to call the tool correctly. It lacks explicit error-condition or prerequisite guidance, but the provided information is sufficient for a competent agent to determine file type requirements, optional behaviors, and interface choices. Missing items like return format are likely handled by the output schema.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters5/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 0%, so the description must fully compensate. It does: every parameter is explained, including pragmatic details like 'address' being required for raw .bin and 'port' listing allowed values ('SWD', 'JTAG', 'URT', 'USB1'). This goes far beyond the bare schema and gives the agent actionable meaning for each argument.

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?

The description opens with a specific verb and resource: 'Flashes firmware (.elf, .hex, or .bin) onto the target STM32 microcontroller.' This clearly distinguishes the tool from siblings like stm32_erase_flash, stm32_write_memory, or stm32_build_project by focusing on programming compiled firmware. The supported file types add specificity without ambiguity.

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 usage when one has a compiled binary to program onto an STM32, but it does not explicitly contrast with alternatives like stm32_write_memory or stm32_erase_flash. It does provide situation-specific guidance for 'address' (required for raw .bin), which helps in choosing parameters, but lacks explicit 'when not to use this tool' or references to sibling tools.

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