Skip to main content
Glama
hardware-tooling-mcp
by Pheem49

ftdi_spi_transfer

Transfers SPI data over an FT232H/FTDI MPSSE bridge by writing hex bytes on MOSI and reading set bytes from MISO, with configurable chip select, clock, and mode.

Instructions

Perform an SPI exchange/transfer via an FT232H/FTDI MPSSE bridge.

Args: write_hex: Hex bytes string to transmit over MOSI (e.g., '9F' to read JEDEC Flash ID). read_length: Number of bytes to read back on MISO after writing. ftdi_url: PyFtdi device URL (default 'ftdi:///1'). cs: Chip Select index (0..3, default 0). freq_hz: SPI clock frequency in Hz (default 1MHz). mode: SPI mode (0, 1, 2, or 3).

Input Schema

NameRequiredDescriptionDefault
csNo
modeNo
freq_hzNo
ftdi_urlNoftdi:///1
write_hexYes
read_lengthNo

Output Schema

NameRequiredDescriptionDefault

No arguments

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

B3.1/5.0
Behavior2/5

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

With no annotations at all, the description carries the full behavioral burden and leaves key traits unstated: it never says combatting-safety is not the issue but whether the call opens/claims the device, whether CS is asserted/released automatically, what happens on device-not-found or bus error, or whether a write-only call (read_length=0) is the norm. The MOSI/MISO semantics are useful, but operational behavior around hardware contention and failure is undisclosed.

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 one-line purpose is front-loaded and the Args list is terse and scannable, with no filler prose. The example embedded in the write_hex line does double duty without adding bulk.

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?

An output schema exists, so return values need not be explained, and all six parameters are addressed. However, for a hardware-mutating transfer tool with zero annotations, an agent still cannot tell from the description whether the call claims/releases the FTDI device, how CS behaves, or how errors surface, which is meaningful missing context.

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% (only titles and defaults), and the Args block compensates well: it defines write_hex as a hex byte string with a concrete example, explains read_length as MISO bytes read after the write, constrains cs to 0..3 and mode to 0-3, and gives units/defaults for freq_hz. Only minor gaps remain, such as the expected hex format edge cases (spaces, '0x' prefix, odd length).

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 names a specific verb and resource ('SPI exchange/transfer') and the exact hardware path ('FT232H/FTDI MPSSE bridge'), which cleanly separates it from the ftdi_i2c_* and ftdi_gpio_control siblings. It stops short of naming an alternative outright, so it is clear but not perfectly differentiated.

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?

There is no explicit statement of when to use this versus ftdi_i2c_transfer or the serial tools, and no prerequisites (device must be enumerated, MPSSE mode required, bus wiring) are mentioned. The only usage signal is the parenthetical example of reading JEDEC Flash ID, which implies a context rather than stating one.

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