Skip to main content
Glama

read_peripheral_register

Read-onlyIdempotent

Read a named peripheral register (e.g., GPIOA/ODR) from the loaded SVD to inspect STM32 hardware state during debugging.

Instructions

Reads a peripheral register using its name from the loaded SVD.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
sessionNoOptional debug-session name. Omit for the default target.
registerYesRegister name (e.g., 'ODR').
peripheralYesPeripheral name (e.g., 'GPIOA').

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.15.1

TDQS

A3.6/5.0
Behavior3/5

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

Annotations already declare readOnlyHint, idempotentHint, destructiveHint=false, and openWorldHint=false, so the safety profile is fully covered structurally. The description adds the SVD dependency as behavioral context but says nothing about failure behavior when the SVD is absent or the name is unknown, and nothing about the return format.

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?

A single front-loaded sentence with the action, resource, and lookup mechanism stated in order and zero filler. Nothing is superfluous.

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 simple read tool with full schema coverage and annotations covering the safety profile, the description is nearly sufficient. The only gap is that it does not indicate what a read yields (raw value vs decoded fields), which matters given there is no output schema.

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% – every parameter (session, register, peripheral) is documented with examples ('ODR', 'GPIOA') including the optional session. The description adds no meaning beyond the schema; baseline 3 applies when the schema does all the work.

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?

Clear specific verb+resource ('Reads a peripheral register') with a scope qualifier ('using its name from the loaded SVD') that distinguishes it from an address-based read. However, it does not differentiate itself from close siblings such as read_registers or decode_peripheral_register, which an agent must still disambiguate by schema inspection.

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?

'From the loaded SVD' implies a prerequisite (an SVD must be loaded, cf. load_svd) and that lookup is by symbolic name, which is useful context. But there is no explicit when-to-use, when-not-to-use, or named alternative versus read_registers/decode_peripheral_register, so guidance is only implied.

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