Skip to main content
Glama

read_registers

Read-onlyIdempotent

Reads STM32 CPU register groups: core registers, decoded CFSR/HFSR fault status for HardFault triage, or the DWT cycle counter for profiling.

Instructions

Read CPU register groups. what=core([include_raw]) | fault | cycle([enable]). fault decodes CFSR/HFSR; cycle reads the DWT cycle counter.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
whatYesWhich operation to perform.
enableNoIf true, enable and zero the counter before reading.
sessionNoOptional debug-session name. Omit for the default target.
include_rawNoInclude the raw GDB transcript (default false).

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.15.1

TDQS

B3.4/5.0
Behavior3/5

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

Annotations already declare readOnly, idempotent, non-destructive behavior, so the safety profile is covered. The description adds what the fault and cycle modes actually yield, but omits the notable side effect that enable=true enables and zeroes the counter (a state change on a tool marked idempotent) and says nothing about return shape.

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?

Two compact, front-loaded sentences with no filler. The terse bracket notation is dense but still parseable, and the leading sentence establishes scope before the mode breakdown.

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

Completeness3/5

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

For a 4-parameter tool with no output schema, the description covers the mode semantics adequately but leaves gaps: the behavior of enable (zeroing the counter), the meaning of session, and the shape of returned register data are not addressed. Annotations carry the safety story, so this is workable but incomplete.

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 100%, so the baseline is 3. The description lightly annotates include_raw and enable within the mode shorthand but adds no syntax or semantics beyond what the oneOf schema already documents.

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?

States a specific verb and resource ('Read CPU register groups') and enumerates the three selectable modes (core/fault/cycle), so an agent knows exactly what the tool does. It stops short of distinguishing itself from near-siblings like read_peripheral_register or diagnose_fault.

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 mode listing implies when to pick fault ('decodes CFSR/HFSR') versus cycle ('reads the DWT cycle counter'), which is useful selection guidance. However, there is no explicit when-not or pointer to overlapping siblings such as diagnose_fault, which also handles fault analysis, so usage must be inferred.

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