Skip to main content
Glama

decode_register

Split a raw register value into named bitfields to identify each bit's meaning during MCU debugging.

Instructions

把寄存器原始值按位域拆开解释。 fields 形如 [{"name":"HSION","bit":0}, {"name":"PLLSRC","lsb":16,"width":2}]。 手头有寄存器值不知道每个位什么意思时用。

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
valueYes
widthNo
fieldsYes

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
resultYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A3.7/5.0
Behavior2/5

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

No annotations are provided, so the description carries the full burden of behavioral disclosure. It explains the fields input format, but does not state that the operation is read-only, side-effect-free, or how errors are handled; 'decode' implies a pure read, but this is not explicit.

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?

Three short sentences: purpose, fields format, and usage. The content is front-loaded and every sentence earns its place with no wasted words.

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?

Given the output schema covers return values and the tool is relatively simple, the description covers purpose, usage, and the tricky fields parameter well. However, it does not disambiguate from decode_register_svd, and the 'width' parameter remains unexplained, leaving a minor gap.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters4/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. It provides a concrete example for the complex 'fields' array, showing key differences between 'bit' and 'lsb'/'width' forms, which is essential and absent from the schema. It leaves 'value' and 'width' unexplained, though 'value' is self-evident and 'width' has a schema default.

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 description states a specific verb and resource: '把寄存器原始值按位域拆开解释' (decode register raw value into bit fields). It is clear, but it does not explicitly distinguish this tool from the sibling decode_register_svd, which could also decode registers. The manual fields format differentiates it implicitly, but no direct contrast is made.

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 when-to-use condition: '手头有寄存器值不知道每个位什么意思时用' (use when you have a register value and don't know what each bit means). No alternatives or exclusions are mentioned, so it stops short of explicit when-not guidance.

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