Skip to main content
Glama

write_register

Writes a specified value to one STM32 register through J-Link, enabling hardware configuration and debugging changes without reflashing firmware.

Instructions

Write single register / 写入单个寄存器.

Args: register_name: Register name / 寄存器名称 value: Register value / 寄存器值

Returns: Write result / 写入结果

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": {
      "register_name": "<register_name>",
      "value": "<value>"
    },
    "name": "write_register"
  }
}

Input Schema

NameRequiredDescriptionDefault
valueYes
register_nameYes

Output Schema

NameRequiredDescriptionDefault

No arguments

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.3.0

TDQS

C2.6/5.0
Behavior2/5

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

No annotations are supplied, so the description carries the full behavioral burden. For a hardware register write it says nothing about side effects, whether the value is read back or verified, required connection state, or whether the write is reversible/destructive.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness3/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The purpose line is front-loaded and short, but the Args and Returns blocks merely repeat the schema and the existing output schema, so several lines add no information.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness2/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

A register-mutating tool with zero annotations and an undocumented parameter schema needs the description to cover preconditions, side effects and value formatting; none of that is present. The output schema covers return values, but the calling contract is left incomplete.

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

Parameters2/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, but it only restates the parameter names ('register_name: Register name', 'value: Register value'). It gives no format for the register name (e.g. peripheral.register syntax), no indication whether value is hex/decimal, and no range or width constraints.

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 and resource: 'Write single register'. The word 'single' usefully scopes it away from bulk operations like write_memory, though it never names a sibling explicitly.

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 (e.g. device must be connected/halted), and no mention of alternatives such as write_memory or read_register_with_fields for verification.

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