Skip to main content
Glama

decode_peripheral_register

Read-onlyIdempotent

Read and decode an STM32 peripheral register using SVD data to show bitfield names and enumerated values during GDB debugging.

Instructions

Reads and decodes a peripheral register with SVD bitfield names and enumerated values.

Input Schema

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

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.15.1

TDQS

B3.2/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 covered. The description usefully discloses the decoded output shape (bitfield names, enumerated values), but omits the key behavioral prerequisite that SVD data must be loaded for decoding to succeed, and says nothing about failure behavior when it is not.

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?

A single front-loaded sentence with no filler or repetition. It is appropriately sized for the tool's simplicity, though it could have spent a few more words on the load_svd dependency.

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?

With no output schema, the description does convey what the return value looks like (bitfields, enums), which is valuable. But for a tool sitting in a debug session, the missing mention of the SVD prerequisite and the unresolved overlap with read_peripheral_register leave meaningful gaps.

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% and the description adds no parameter-level detail beyond what the schema already documents (peripheral, register, optional session). Baseline 3 is appropriate since the schema carries the parameter semantics.

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+resource ('Reads and decodes a peripheral register') and adds the distinguishing detail that results carry SVD bitfield names and enumerated values, so it is clearly richer than a raw read. However, it never references the near-identical sibling 'read_peripheral_register', so an agent cannot tell the two apart from the description alone.

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

Usage Guidelines2/5

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

No when-to-use guidance, no prerequisites, and no named alternatives are given. The description does not say when decoding is preferable to the sibling read_peripheral_register, nor that an SVD must be loaded (via load_svd) before decoding works.

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