Skip to main content
Glama
phryniszak

stm32-stlink-mcp

by phryniszak

Write memory

memory_write

Write raw bytes to target RAM/registers at a specified address, blocking flash writes unless explicitly permitted.

Instructions

Writes raw bytes to target RAM/registers at an address. Blocked for addresses inside the flash window (use flash_standalone / flash_load_in_session for flash) unless STMCP_ALLOW_FLASH_ADDRESS_WRITE is set.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
addressYesHex address (0x...) or a gdb expression evaluating to an address
bytesHexYesBytes to write, as a hex string, e.g. 'deadbeef'
sessionIdYes
Behavior4/5

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

With no annotations, the description carries the full burden for behavioral disclosure. It reveals the blocking behavior for flash addresses and the environment variable override, adding meaningful context beyond a simple 'write' action. It does not detail return values or side effects, but for a write tool, the disclosed constraints are significant.

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?

Two sentences, front-loaded with the primary purpose, then the key constraint and alternatives. Every word earns its place, and the structure is clear and efficient.

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 3-parameter tool with no annotations and no output schema, the description is quite complete: it explains what it does, where it operates, what is blocked, and provides fallback tools. It does not explain return values, but that's acceptable without an output schema. The only minor gap is the lack of any note about write permissions or side effects, but the flash constraint and exception are the most critical context.

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 67%, so the schema already covers address and bytesHex with examples and type hints. The description adds context about 'raw bytes' and 'target RAM/registers' but does not clarify sessionId or add much beyond the schema. With medium coverage, the description neither fully compensates nor is redundant.

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 clearly states the tool writes raw bytes to target RAM/registers at an address, using the specific verb 'writes' and identifying both the resource and action. It distinguishes itself from sibling tools like flash_standalone and register_write by explicitly mentioning RAM/registers and the flash exclusion.

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

Usage Guidelines5/5

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

Provides explicit guidance on when to use this tool (RAM/registers) and when not to (flash window), and names alternatives (flash_standalone / flash_load_in_session). It also discloses the exception via STMCP_ALLOW_FLASH_ADDRESS_WRITE, giving clear decision criteria.

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

Install Server

Other Tools

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/phryniszak/stmcp'

If you have feedback or need assistance with the MCP directory API, please join our Discord server