Skip to main content
Glama
brovk2008

STM32Cube-MCP

by brovk2008

stm32_erase_flash

Erase STM32 target flash memory via SWD, JTAG, or UART. Choose full-chip mass erase or specify a sector address range for partial erasure.

Instructions

Erases target flash memory.

Args: mode: 'all' for full chip mass erase, or 'sectors' with start_address and end_address. start_address: Start address (e.g. '0x08000000') for sector erase. end_address: End address (e.g. '0x08004000') for sector erase. port: Connection port ('SWD', 'JTAG', 'URT').

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
modeNoall
portNoSWD
end_addressNo
start_addressNo

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
resultYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv1.0.0

TDQS

A3.9/5.0
Behavior3/5

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

No annotations are present, so the description carries the burden of disclosure. It does disclose what is destroyed — flash memory, either full chip or a sector range — and so the destructive nature is clear. However, it does not explicitly mention irreversibility, loss of existing firmware, or any required target/probe state.

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 well-scannable: one purpose line followed by four short, information-dense argument lines. Every sentence adds value, and the most important scoping information is front-loaded.

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?

With schema defaults and an output schema available, the description covers the core invocation details: mode, addresses, and port. It is slightly light on safety context — such as the destructive nature of erasing flash and the possibility of bricking a target — but an agent can correctly construct a valid call from the provided information.

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%, but the description fully compensates: it defines mode values, links 'sectors' to start_address and end_address, gives concrete address examples, and lists valid port choices. This is exactly the meaning an agent needs beyond the bare schema.

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 uses a specific verb and resource — "Erases target flash memory" — and adds scope detail by distinguishing full chip mass erase from sector erase. The action is unique among sibling tools, making it clearly distinct from flashing, reading, or writing operations.

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?

It explains when to choose 'all' vs 'sectors', but gives no guidance on when to use this tool instead of alternatives like stm32_flash_firmware, stm32_read_memory, or stm32_dump_flash_to_file. There are no prerequisites, exclusions, or explicit usage conditions beyond the internal mode choice.

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