Skip to main content
Glama

flash_file

Destructive

Writes a bitstream or firmware image to the SPI flash at a specified offset, overwriting existing content and optionally rebooting the FPGA to boot the new image.

Instructions

PERSISTENT: write a file to the SPI flash at the given offset. Overwrites existing content; requires confirm=true after asking the user.

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": {
      "path": "<path>"
    },
    "name": "flash_file"
  }
}

Input Schema

NameRequiredDescriptionDefault
pathYesFile to write to SPI flash (bitstream or firmware image).
offsetNoFlash byte offset, multiple of 256 (0 = bitstream, 0xB0000 = SoC firmware).
rebootNoSoft-reset the FPGA afterwards so it boots the new image.
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

A3.8/5.0
Behavior4/5

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

Annotations already flag destructiveHint=true and readOnlyHint=false, but the description adds genuine context beyond them: writes are persistent across power cycles, existing flash content is destroyed, and human confirmation is mandatory. It does not mention failure modes or what happens on a partial write, which keeps it short of a 5.

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, front-loaded with the most decision-relevant fact ('PERSISTENT') followed by the destructive consequence and the confirmation gate. No filler.

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?

An output schema exists, so return values need not be explained, and the schema carries offset and reboot details. The description covers the destructive/persistent nature and the confirmation workflow, leaving only minor gaps like error behavior on invalid offsets.

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 100%, so path, offset, reboot and confirm are all documented in the schema itself, including the offset alignment and known magic offsets. The description only echoes 'at the given offset' and the confirm rule, adding little semantic value beyond structured fields.

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 a file to the SPI flash at the given offset') with the 'PERSISTENT' qualifier signaling durability. An agent can distinguish this from read_flash or erase_flash by the verb alone, though no sibling is named 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 prerequisite: confirm=true must be set after asking the user. It also warns that existing content is overwritten. However, it never routes the agent between this tool and alternatives such as flash_gateware or erase_flash, so the when-to-use decision is only implied.

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