Skip to main content
Glama

read_memory

Read-onlyIdempotent

Read a block of STM32 target memory by address and length, returning raw bytes plus a little-endian value so peripheral register bit positions are not misread.

Instructions

Reads a block of memory from the target. Returns the raw bytes in memory order, plus value_le -- the same bytes as one little-endian value -- for a 1/2/4/8-byte read. Use value_le for a peripheral register: the raw string arrives least-significant-byte first, so reversing it by hand is where bit positions get misread.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
lengthYesNumber of bytes to read.
addressYesHex address to read from, e.g., '0x20000000'.
sessionNoOptional debug-session name. Omit for the default target.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.15.1

TDQS

A3.9/5.0
Behavior4/5

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

Annotations already declare the safety profile (readOnly, idempotent, non-destructive, closed-world), so the bar is lower. The description still adds real value beyond them: it documents the return shape (raw bytes in memory order plus value_le), the little-endian byte ordering, and the rationale that hand-reversing leads to misread bit positions. That is useful behavioral/output context not present in the annotations.

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?

Three sentences, front-loaded with the core action, and no repetition of the schema. The third sentence is longer but earns its place by explaining the byte-ordering pitfall that motivates value_le.

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

Completeness5/5

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

There is no output schema, so the description carries the burden of explaining return values, and it does so clearly (raw bytes plus value_le, with little-endian semantics). For a simple read tool whose annotations already cover the safety profile, nothing essential for invoking it correctly is missing.

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

Parameters4/5

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

Schema coverage is 100%, so the schema documents address, length, and session, making 3 the baseline. The description adds meaning tied to length by specifying the useful sizes (1/2/4/8 bytes) for which value_le is produced, which is semantic guidance absent from the schema itself.

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

Purpose4/5

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

Specific verb 'Reads' plus resource 'a block of memory from the target', and it goes further by describing what the call returns (raw bytes plus value_le). It does not, however, draw a line against adjacent siblings such as read_variable, read_registers, typed_memory, or read_peripheral_register, so the boundary is left to the agent to infer.

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?

It gives one concrete usage instruction -- use value_le when the read targets a peripheral register -- which is clear context for interpreting the result. But there is no statement of when to choose read_memory over its many read-oriented siblings, and no prerequisites or exclusions, so the guidance is largely implied.

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