Skip to main content
Glama
brovk2008

STM32Cube-MCP

by brovk2008

stm32_write_memory

Write a 32-bit value directly to an STM32 memory address or peripheral register using SWD or JTAG for low-level debugging and configuration.

Instructions

Writes a 32-bit word directly to a target memory address or peripheral register.

Args: address: Target address (e.g. '0x20000000'). value: Hex value to write (e.g. '0x12345678'). port: Connection interface ('SWD', 'JTAG').

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
portNoSWD
valueYes
addressYes

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
resultYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv1.0.0

TDQS

B3.2/5.0
Behavior2/5

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

With no annotations, the description must carry behavioral disclosure, but it only states the operation and width. It does not mention the potential for corrupting runtime state, need for a halted/connected target, error behavior, or reversibility—all material for a direct memory write.

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?

One clear purpose sentence plus a compact Args block with no filler; every sentence adds value and key information is front-loaded.

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?

For a low-level hardware write tool with no annotations, the description lacks prerequisite context such as target connection or active debug session, and it provides no risk guidance for writing arbitrary memory. The existing content is enough for syntax but not for safe and correct invocation.

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?

Schema description coverage is 0%, so the description compensates by adding a one-line explanation and hex examples for address/value and allowed SWD/JTAG choices for port. It still omits constraints like word alignment, address validity, and that port defaults to SWD, though the default is present in the 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 opening line states a specific operation—'Writes a 32-bit word'—and targets distinct resources: memory addresses or peripheral registers. This differentiates it from sibling write tools such as stm32_write_option_bytes and stm32_write_serial.

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?

No when-to-use or when-not-to-use guidance is provided; it never names alternatives or conditions such as low-level register debugging vs flashing. The only implicit signal is 'directly,' but an agent isn't told what prerequisites or exclusions apply.

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