Skip to main content
Glama

debug_session_start

Start a persistent OpenOCD debug session to control CPU execution, set hardware breakpoints/watchpoints, inspect registers/stack, and return a session ID for subsequent debug operations.

Instructions

Start a real-time debug session via a persistent OpenOCD connection.

Enables CPU control (halt/resume/step/reset), hardware breakpoints, watchpoints, register access, and stack inspection through the debug_* tools. One session per probe.

Args: probe: Board nickname, probe nickname, or ST-Link SN. elf_path: Path to the firmware .elf — enables symbol names for breakpoints and source locations in halt reports. Recommended.

Returns: Session ID (pass to all other debug_* tools) and core state.

Input Schema

NameRequiredDescriptionDefault
probeNo
elf_pathNo

Output Schema

NameRequiredDescriptionDefault
resultYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A4.4/5.0
Behavior4/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 disclose meaningful behavior: the connection is persistent OpenOCD, sessions are per-probe and singular, and the returned session ID is a required token for subsequent debug_* calls. It does not say whether starting a session halts or disturbs a running target, or what happens on a duplicate/failed start — gaps that matter for a stateful, mutating operation.

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 the one-line purpose, then a capability summary, then Args/Returns blocks — easy to scan. Slightly padded by the Returns section, which duplicates the output schema, but no sentence is genuinely wasted.

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?

For a stateful session-opening tool with no annotations and no schema descriptions, the definition covers purpose, prerequisites, identifier formats, the optional-but-recommended ELF, and the session-ID contract. Remaining gaps are failure modes and target-state side effects, which the output schema does not cover either.

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% and both properties are bare strings with defaults, so the description must compensate entirely — and it does. 'probe' accepts a board nickname, probe nickname, or ST-Link SN (three accepted identifier forms), and 'elf_path' is documented with its concrete effect (symbol names in breakpoints and source locations in halt reports) plus a 'Recommended' signal.

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 ('Start a real-time debug session') plus the underlying mechanism (persistent OpenOCD connection), and enumerates the capabilities it unlocks (halt/resume/step/reset, breakpoints, watchpoints, registers, stack). The phrase 'through the debug_* tools' and 'One session per probe' make it easy to place relative to debug_session_stop, debug_status, and live_memory_start.

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?

Implies the workflow clearly: start this first, then 'pass [the session ID] to all other debug_* tools', and notes the 'one session per probe' limit. It does not explicitly say when to prefer this over live_memory_start or serial_connect, nor what to do if a session already exists, so it stops short of full alternative routing.

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