Skip to main content
Glama
bitpirate-mcp
by Indigaz

spi_write

Destructive

Write data to SPI flash from a binary file, hex string, or ASCII string at a target address. Confirmation is required because it overwrites flash contents.

Instructions

Write data to SPI flash (firmware menu 6): from a file, hex string, or ASCII string. DANGEROUS: overwrites flash. [approval-write] [Duration: fast - slow (depends on size).]

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": {
      "address": "<address>",
      "_confirmed": "<_confirmed>"
    },
    "name": "spi_write"
  }
}

Input Schema

NameRequiredDescriptionDefault
addressYesTarget flash address
data_hexNoHex string (e.g. 'DEADBEEF')
_confirmedYesSet true to confirm execution
auto_eraseNoAutomatically erase affected blocks
input_pathNoPath to binary file to write
ascii_stringNoASCII string to write

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A3.8/5.0
Behavior4/5

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

Annotations already declare destructiveHint=true and readOnlyHint=false; the description adds real value on top by spelling out that existing flash contents are overwritten, tagging it '[approval-write]', and noting the size-dependent duration. It does not say what happens to adjacent blocks or what the response returns.

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 short sentences, front-loaded with the action and the danger warning is not buried. The 'firmware menu 6' reference and bracketed duration note are slightly noisy but informative.

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?

With no output schema, the description covers the dangerous mutation, the required confirmation flow is captured by _confirmed in the schema, and duration is disclosed. It leaves open prerequisites (whether a device must be opened via open_spi first) and payload mutual exclusivity, which are the remaining gaps for a 6-parameter write tool.

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 coverage is 100%, so the baseline is 3, but the description adds meaning the schema does not: the three payload parameters (input_path, data_hex, ascii_string) are presented as alternative input modes rather than cumulative fields. It still doesn't state explicitly that exactly one must be supplied, which is the main unresolved ambiguity.

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 data to SPI flash') and enumerates the three accepted data sources, so an agent can tell it apart from spi_read or spi_flash_erase by verb alone. It never names a sibling as an alternative, so it stops short of full differentiation.

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?

The 'DANGEROUS: overwrites flash' note implies when caution is warranted and the source list implies the intended scenarios, but there is no explicit when-to-use vs. when-not guidance and no pointer to spi_flash_erase or spi_read for the safer paths.

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