Skip to main content
Glama

program_flash

Programs firmware data to a specified Flash address on J-Link targets, with optional post-programming verification.

Instructions

Program firmware to Flash / 烧录固件到 Flash.

Args: address: Start address / 起始地址 data: Data to program / 要烧录的数据 verify: Whether to verify after programming / 烧录后是否校验

Returns: Programming result / 烧录结果

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>",
      "data": "<data>"
    },
    "name": "program_flash"
  }
}

Input Schema

NameRequiredDescriptionDefault
dataYes
verifyNo
addressYes

Output Schema

NameRequiredDescriptionDefault

No arguments

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.3.0

TDQS

C2.6/5.0
Behavior2/5

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

With no annotations, the description carries the full behavioral burden, and it discloses almost nothing: not that this is a destructive write to device flash, not that it requires an active connection, not what happens to existing contents, and not how long it takes or whether it resets the CPU. The only behavioral note is the optional post-program verify flag, which is already visible in the schema.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness3/5

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

The purpose is front-loaded in one line, which is good, but the Args/Returns blocks duplicate schema information and every sentence is repeated in Chinese, roughly doubling length for no additional information.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness2/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, but for a destructive 3-parameter flash-write tool with zero annotation and zero schema description coverage, the definition is far too thin. It should cover target state requirements, overwrite semantics, and address/data constraints.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters2/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 0%, so the description must compensate, but the Args block mostly restates schema titles: 'address' gains only 'Start address' (no units, hex format, or alignment rules), 'data' gains nothing beyond 'Data to program', and 'verify' merely restates its name. Real semantic gaps — address width/alignment, data size limits, verify's default — are left to the schema.

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 ('Program firmware to Flash'), which is clearly distinct from erase/verify siblings at the action level. However, it never distinguishes itself from verify_flash or explains its relation to erase_flash, even though it exposes a 'verify' parameter that overlaps with the dedicated verify tool.

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 guidance on when to use this tool versus erase_flash or verify_flash, no prerequisites (e.g. a connected/halted target), and no warning that programming overwrites existing flash contents. The agent must infer the whole workflow from sibling names.

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