Skip to main content
Glama

spi_read_reg

Send an SPI command byte and read back N response bytes to inspect registers or identify devices, such as reading a JEDEC ID.

Instructions

发一个 SPI 命令字并读回 N 字节(对读了命令字的从设备通用)。

例:读 JEDEC ID → spi_read_reg(cmd_byte=0x9F, count=3)。

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
csNo
busNo
portNo
countNo
baudrateNo
cmd_byteYes

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
resultYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

B3/5.0
Behavior2/5

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

No annotations are provided, so the description bears full behavioral burden. It discloses only that it transmits a command byte and reads back bytes; nothing about chip-select handling, bus selection, clock/baudrate behavior, timing, or constraints. This is a thin disclosure for a hardware bus operation.

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?

Two short sentences, purpose front-loaded, followed immediately by a concrete call example. No filler; every clause earns its place.

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?

An output schema exists so return values need no explanation. But with six parameters at 0% schema coverage and no annotations, the definition leaves bus/cs/port/baudrate entirely opaque, which is insufficient for correct invocation.

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% across 6 parameters, so the description must compensate. The example clarifies cmd_byte and count semantics, but cs, bus, port, and baudrate receive no explanation anywhere, leaving half the surface undocumented.

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: sends an SPI command byte and reads back N bytes, with the qualifier that it suits slaves that read command words. This is clear and distinguishable from i2c_read_reg by bus, 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 Guidelines3/5

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

Provides a concrete usage example (read JEDEC ID with cmd_byte=0x9F, count=3) and notes the applicable device class, which implies when to use it. However it gives no explicit when-not guidance and does not contrast with spi_scan or i2c_read_reg.

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