Skip to main content
Glama

flash_and_run

Destructive

Flash an ELF to an STM32 target, halt at the entry point, and receive decoded stop context in one call. Starts a session pinned to a chosen probe when needed.

Instructions

One-call bring-up: flash an ELF (loads symbols), reset-halt, set a temporary breakpoint at an entry point (default 'main'), run to it, and return the decoded stop context. With hub_channel (or usb_location) and no session running, it starts one pinned to that probe first -- so 'flash the firmware on channel 4' is this single call, on a bench with several probes, without disconnecting any of the others.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
mcuNoPassed through when this call starts the session; falls back to the profile.
run_toNoEntry point to stop at (default 'main').
sessionNoOptional debug-session name. Omit for the default target.
file_pathYesPath to the ELF to flash.
hub_channelNoStart a session on the probe at this hub channel first, if none is running. Uses the usb_location recorded for it in the profile's hub.map. Ignored when a session is already live -- it flashes through that one.
timeout_secNoMax seconds to wait (default 10).
usb_locationNoSame, but naming the USB position directly, e.g. '1-1.4'.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.15.1

TDQS

A4.4/5.0
Behavior5/5

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

Annotations already flag the tool as destructive, non-read-only, and non-idempotent. The description adds substantial context: the internal sequence (load symbols, reset-halt, temporary breakpoint, run to entry, return decoded stop context) and session-pinning logic, including that hub_channel is ignored when a session is already live.

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 sentences, front-loaded with the core operation. The second sentence is dense but delivers non-redundant session behavior; no wasted words, though a more structured presentation could improve readability.

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

Completeness5/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

For a complex, multi-step tool with no output schema, the description covers the purpose, action sequence, session selection, and return value ('decoded stop context'). All required parameters are documented in the schema, and nothing critical for correct invocation appears missing.

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 all seven parameters, including defaults for run_to ('main') and hub_channel behavior. The description reinforces the default entry point and session logic but does not add syntax, format, or examples beyond what the schema provides, so baseline 3 is appropriate.

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 states a specific composite verb+resource ('one-call bring-up: flash an ELF... reset-halt, set breakpoint, run...') and explicitly frames it as a single call that replaces multiple steps. It distinguishes itself from single-operation siblings like flash_firmware or reset_target by emphasizing the combined workflow.

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 gives a clear usage context: with hub_channel or usb_location and no session running, it starts a session pinned to that probe, and it does not disconnect other probes. However, it does not explicitly name alternatives (e.g., call flash_firmware then reset_target) or state when not to use this tool, so guidance falls short of the top score.

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