Skip to main content
Glama

read_periph

Reads SVD-decoded peripheral registers from a running Keil uVision debug session, such as TIM2 or USART1.SR, with a guarded force option for registers that have side effects.

Instructions

Thanh ghi ngoại vi giải mã theo SVD, vd ["TIM2", "USART1.SR"]. force=true (mức control + reason) mới đọc thanh ghi có tác dụng phụ.

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": {
      "names": "<names>"
    },
    "name": "read_periph"
  }
}

Input Schema

NameRequiredDescriptionDefault
forceNo
namesYes
reasonNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A3.6/5.0
Behavior4/5

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

Annotations declare readOnlyHint=false but say nothing about why; the description explains that some register reads have side effects and that a force flag plus reason is the required gate. That is genuine context beyond the structured fields. It stops short of saying what the side effects are or what happens when force is omitted.

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?

Two compact sentences with the core capability first and the safety gate second; nothing is wasted. The compression of the force/reason condition into a parenthetical makes it slightly harder to parse than a full clause would.

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 and three undocumented parameters, the description should say what comes back (decoded values, addresses, widths), which it does not. The write-hazard story is covered, but an agent still lacks the return shape and the failure mode of a side-effecting read.

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 coverage is 0%, so the description carries the burden, and it does clarify the names format via the SVD-style examples and ties force to reason. However, 'mức control' is unexplained jargon and the purpose of reason (audit trail? privilege escalation?) is left ambiguous.

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 — read peripheral registers decoded via SVD — and gives concrete name examples ("TIM2", "USART1.SR") that pin down the resource. It does not distinguish itself from the sibling read_registers, so an agent must infer the difference 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 Guidelines3/5

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

Gives one clear conditional rule: side-effecting registers require force=true together with a reason. It offers no guidance on when to prefer this over read_registers, read_memory, or snapshot, so the routing decision among siblings remains implicit.

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