Skip to main content
Glama

flash_verify

Verify flashed firmware by reading back chip memory and comparing byte-by-byte with the source file (.bin/.hex/.elf). Reports the first mismatch offset and context to diagnose incomplete or incorrect writes.

Instructions

烧录后校验:把固件文件与芯片上实际内容逐字节比对(只读,走 hotplug)。

比 -v 有用:-v 只能紧跟烧录命令,等于重烧一遍;这个读回来直接比, 还会报出第一个不一致的偏移和前后 8 字节上下文 —— 能直接看出来是「整段没写进去」 还是「某几个字节错了」。

file_path 支持 .bin(配 address,默认 0x08000000)/ .hex / .elf。 烧完提示 "verified" 但设备不工作时,先调它排除「根本没烧进去」。 ★ 不要拿 CLI 的 -checksum 和 -fchecksum 互相验:两者口径不同,实测同一份固件 给出不同值。字节比对才是唯一真凭据。

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
snNo
chunkNo
addressNo
file_pathYes

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
resultYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A4.3/5.0
Behavior4/5

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

With no annotations provided, the description carries the full burden and does so well: it declares the operation read-only, notes it runs over hotplug, and discloses the diagnostic output (first mismatch offset plus 8 bytes of surrounding context, distinguishing a fully unwritten segment from a few bad bytes). It omits auth/permission needs and any performance or chunk-related behavior, keeping 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.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

Front-loads the core action, then the comparison-to-`-v` rationale, then file formats, then the debugging trigger, then the checksum caveat. Every section is relevant to invoking the tool correctly, though the emblem-heavy formatting and the extended `-v`/checksum digressions are slightly more verbose than strictly necessary.

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 spelled out, and the description still explains the key diagnostic payload. For a verification tool it covers usage, file formats, and comparison semantics well; the gaps are the undocumented `sn` and `chunk` parameters rather than missing conceptual guidance.

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 0%, so the schema contributes nothing beyond bare titles. The description compensates for file_path (explaining .bin/.hex/.elf support and the default 0x08000000 base address for .bin) and partially for address, but says nothing about `sn` or `chunk`, leaving half the parameters undocumented in both places.

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?

States a specific verb+resource: byte-by-byte comparison of a firmware file against actual chip contents. It distinguishes itself from the sibling flash_firmware and from CLI's `-v` and `-checksum`/`-fchecksum` mechanisms, so an agent can tell exactly what this tool is and is not.

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

Usage Guidelines5/5

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

Gives an explicit trigger condition ('flash reported verified but device doesn't work, call this first to rule out a failed write'), names the alternative it supersedes (`-v` re-flashes; this reads back), and explicitly warns against verifying with `-checksum`/`-fchecksum` because their semantics differ. When-to-use, when-not, and alternatives are all present.

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