Skip to main content
Glama

Rake

Decode or compare register dumps

decode_registers
Read-onlyIdempotent

Decodes a register dump of a microcontroller into registers and bit fields, with the named value of each field, from the vendor's own file for the part. With a second dump it returns only what differs between the two. Use it to see what a peripheral is really set to, and to compare a setup that works with one that does not: a vendor example against your code, or a good board against a bad one. A dump is a read: on some status and data registers a read clears flags or takes a byte. Covers 935 devices from ST, Nordic, Raspberry Pi, Espressif, Microchip, NXP and TI, and says so when it has no data for a part.

Tool call template

Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {
      "device": "<device>",
      "dump": "<dump>"
    },
    "name": "decode_registers"
  }
}

Input Schema

NameRequiredDescriptionDefault
dumpYesThe dump, in 32-bit words: lines as GDB prints them for `x/16xw 0x40011000`, as OpenOCD prints them for `mdw`, or lines of the form `USART1->CR1 = 0x200C`.
deviceYesThe part, for example STM32F407VGT6, stm32g431, nrf52840 or esp32c3.
compareNoA second dump of the same registers, for example from the setup that fails. The answer then holds only the differences, as first -> second.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A4.1/5.0
Behavior5/5

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

Beyond the readOnlyHint/idempotent annotations, it discloses a real operational caveat: reading certain status and data registers can clear flags or consume a byte. It also states device coverage (935 parts across named vendors) and that it reports when it has no data for a part, which tells the agent how partial failure looks.

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?

The purpose and compare behavior are front-loaded, followed by use cases, a safety caveat, and coverage. Every sentence carries information, though the use-case sentence is somewhat long and the compare restatement is mild redundancy.

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?

With no output schema, the description still tells the agent what comes back (registers and bit fields with named values, or only the differences in first -> second form). Combined with the device-coverage note and the read-side-effect warning, an agent has enough to call this correctly.

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 schema already documents dump formats (GDB x/16xw, OpenOCD mdw, USART1->CR1 = 0x200C) and the compare semantics. The description's note that a second dump returns 'only what differs' largely restates the compare field, so it adds little beyond the schema. Baseline 3 applies.

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?

The definition names a specific verb and resource ('Decodes a register dump ... into registers and bit fields, with the named value of each field') and adds the source of truth (the vendor's own file for the part). The compare mode is stated plainly. It stops short of distinguishing itself from siblings such as check_registers or lookup_register, so an agent must infer the boundary from names alone.

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 concrete when-to-use scenarios: seeing what a peripheral is really set to, and comparing a working setup against a failing one (vendor example vs your code, good board vs bad board). There is no explicit when-not-to-use and no sibling alternative is named, so it is clear context rather than full routing guidance.

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

Try in Browser

Glama MCP Gateway

Add one secure layer between your agents and this server.

Resources