Skip to main content
Glama

live_memory_start

Starts continuous background memory monitoring over SWD by polling selected variables at a set interval and writing results to JSONL for live inspection.

Instructions

Start continuous background memory monitoring via SWD.

Launches a persistent OpenOCD connection and polls the specified variables at the given interval. Results are written to a JSONL file and kept in a ring buffer accessible via live_memory_read. Variables can be edited while the session runs via live_memory_write.

IMPORTANT: Only one live_memory session per probe at a time. Stop any existing session before starting a new one. Stop live_memory before flashing or using stm32_read_memory/stm32_write_memory.

Args: variables: JSON array of variables to monitor. Elements can be: - String: plain symbol ("blink") or C path with dots/indices ("g_app.dosing.cfg.pid_kp", "tasks[2].lastRunMs"), resolved from the ELF. Structs (size > 4 bytes) are auto-expanded into individual fields with dotted names; prefer a sub-struct like "g_app.dosing" over a huge root ("g_app") to keep the poll fast. - Dict with "symbol": {"symbol": "temp", "type": "float"} Add "expand": false to disable struct auto-expansion. - Dict with "address": {"address": "0x20000304", "name": "x", "width": 32} elf_path: Path to .elf file for symbol resolution. probe: Board nickname, probe nickname, or ST-Link SN. Empty auto-selects the only connected board. interval_ms: Polling interval in milliseconds (minimum 250). output_path: JSONL output file path. Default: /tmp/live_memory_.jsonl

Returns: Session ID, output path, and resolved variable list.

Input Schema

NameRequiredDescriptionDefault
probeNo
elf_pathNo
variablesYes
interval_msNo
output_pathNo

Output Schema

NameRequiredDescriptionDefault
resultYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A4.9/5.0
Behavior5/5

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

With no annotations, the description carries the full burden and does so well: it discloses that a persistent OpenOCD connection is held, that results are streamed to a JSONL file and mirrored into a ring buffer, and that exclusivity is per-probe. The explicit warning to stop the session before flashing or direct memory access is exactly the kind of cross-tool hazard annotation would otherwise supply.

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-loaded with purpose, then the critical exclusivity warning, then Args in schema order — a reader can stop at any tier. The closing Returns block slightly duplicates the existing output schema, and a few parenthetical examples run long, but no sentence is filler.

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 stateful tool with five parameters, no annotations, and an output schema, this covers what an agent needs: lifecycle, exclusivity, side effects on disk, poll-rate floor, and interaction hazards with flashing and direct memory tools. Return values are the output schema's job and the description only sketches them.

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

Parameters5/5

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

Schema coverage is 0%, so the description must compensate and does: each of the five parameters is given meaning, including three accepted element formats for variables with worked examples, struct auto-expansion behavior with an expand:false escape hatch, the 250ms floor on interval_ms, and the output_path default. It also resolves the trap that variables is typed as a string but must contain a JSON array.

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?

Opens with a specific verb+resource ("Start continuous background memory monitoring via SWD") and immediately ties itself to its siblings live_memory_read and live_memory_write, which are the read/edit counterparts of the session it launches. An agent can distinguish it from debug_session_start or stm32_read_memory without opening any schema.

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?

Explicit when/when-not guidance: only one session per probe, stop existing sessions first, and stop live_memory before flashing or using stm32_read_memory/stm32_write_memory. That names concrete conflicting siblings and the ordering constraint that governs them.

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