Skip to main content
Glama

debug_registers

Reads core or full register values from a halted STM32 session—PC, LR, SP, xPSR, r0–r12, MSP/PSP—and annotates PC/LR with function and source line when an ELF is loaded.

Instructions

Read core registers while the core is halted.

Args: session_id: Session ID from debug_session_start. regs: "core" (default) = PC, LR, SP, xPSR; "all" = full register dump (r0-r12, SP, LR, PC, xPSR, MSP/PSP, CONTROL...); or a single register name like "r5" or "pc".

Returns: Register values in hex. PC and LR are annotated with function and source line when an ELF is loaded.

Input Schema

NameRequiredDescriptionDefault
regsNocore
session_idYes

Output Schema

NameRequiredDescriptionDefault
resultYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A4.5/5.0
Behavior4/5

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

With no annotations, the description carries the behavioral burden well: it declares a read operation, requires a halted core, and explains return formatting in hex plus PC/LR source annotation when an ELF is loaded. It does not explicitly state error behavior if the core is running, but the prerequisite is disclosed.

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 definition is front-loaded with the core operation and then uses clear Args/Returns structure. Every sentence adds useful information about prerequisites, accepted values, or return formatting without unnecessary repetition.

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?

The description covers purpose, prerequisite, parameters, and return behavior, which is strong given the zero schema coverage and lack of annotations. It could be slightly more complete by stating what happens if the core is not halted or by naming the relevant halt/status sibling tools.

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%, so the description must compensate for both parameters. It does so fully: session_id is tied to debug_session_start, and regs is explained with default 'core', 'all', and single-register forms including concrete examples.

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 states a specific verb and resource: read core registers. It adds a critical execution condition, 'while the core is halted,' and clearly distinguishes register access from sibling memory tools such as debug_mem and stm32_read_memory.

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

Usage Guidelines4/5

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

It gives a clear prerequisite that the core must be halted and identifies debug_session_start as the source of the session ID. It does not explicitly name alternatives or state when not to use this tool, so it falls short of full when/when-not guidance.

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