Skip to main content
Glama

flash_gateware

Destructive

Write bundled gateware to SPI flash for persistent power-on boot, including SoC firmware for Facedancer targets. Requires user confirmation, then reboots the FPGA to apply changes.

Instructions

PERSISTENT: write a bundled gateware to SPI flash so it boots at power-on (facedancer also writes the SoC firmware). Requires confirm=true after asking the user. Reboots the FPGA afterwards.

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": {
      "target": "<target>"
    },
    "name": "flash_gateware"
  }
}

Input Schema

NameRequiredDescriptionDefault
targetYesBundled gateware to write persistently to SPI flash.
confirmNoMust be true; ask the user before setting it.

Output Schema

NameRequiredDescriptionDefault

No arguments

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A4.2/5.0
Behavior4/5

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

The annotations already declare destructiveHint=true and readOnlyHint=false, so the safety bar is partly covered. The description adds genuinely new behavior: persistence across power cycles, the facedancer-specific SoC firmware side effect, and that the FPGA reboots afterwards — all important consequences an agent must anticipate. It does not say whether existing flash contents are overwritten or what happens on failure, so it falls just short of the top score.

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?

The 'PERSISTENT:' prefix front-loads the single most decision-relevant fact, and each following clause carries a distinct payload (target scope, confirmation requirement, side effect, reboot). There is no filler or repetition.

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?

For a destructive, hardware-mutating tool, the description covers persistence, the confirmation gate, a target-specific side effect, and the post-write reboot, and an output schema exists so return values need not be explained. The remaining gap is the lack of detail on overwrite semantics for pre-existing flash content.

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 description coverage is 100%, so the schema already documents both parameters and the target enum, making 3 the baseline. The description reinforces the confirm contract and clarifies that the 'facedancer' target additionally writes SoC firmware, which is a useful semantic addition, but it adds little about the other enum values.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/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 ('write a bundled gateware to SPI flash') and front-loads the 'PERSISTENT' qualifier that separates it from a transient run/load operation. An agent can tell that this makes the gateware survive power-on, which is the key distinguishing scope.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines4/5

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

It states the precondition ('Requires confirm=true after asking the user') and the context that makes the tool appropriate (boots at power-on), which is strong usage guidance. It stops short of explicitly naming a non-persistent alternative such as run_gateware for temporary use, so the when-not-to-use side is only implied by 'PERSISTENT'.

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