Skip to main content
Glama

debug_start_session

Destructive

Start a GDB session on an ELF firmware image to enable debug_continue and debug_halt on OpenOCD-backed embedded targets.

Instructions

Opens a GDB session on an ELF for debug_continue and debug_halt. OpenOCD backend only; others answer not_supported. Needs GDB (debug.gdb_executable or PATH), the debugger entry's scripts and allow_raw_debugger_commands off. Returns the core halted: session (status, stop_reason), log_path. A second start: session_already_active. debug_get_session_status inspects it; debug_stop_session ends it.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
modeNoattach (default): halts the core, no reset. reset_halt: resets, halts; needs allow_reset. load: resets, flashes the ELF, resets, halts; needs allow_reset and allow_flash, not allow_mass_erase.attach
timeout_sNoSeconds. Default and ceiling: the debugger entry's timeout_s (60 unless set); 0.1 at least. Bounds the debug server's start and each GDB step (10 s at most). Expiry: timeout.
image_pathNoPath to a .elf file, relative to the workspace or absolute, inside the workspace and (by default) artifacts.allowed_roots. Give this or artifact_id, not both.
artifact_idNoId of an ELF stored with artifact_upload. Give this or image_path, not both.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed4 schema fields changedv0.22.1
    • addedInput schema / properties / artifact_id / description
      Added value: +"Id of an ELF stored with artifact_upload. Give this or image_path, not both."
    • addedInput schema / properties / image_path / description
      Added value: +"Path to a .elf file, relative to the workspace or absolute, inside the workspace and (by default) artifacts.allowed_roots. Give this or artifact_id, not both."
    • addedInput schema / properties / mode / description
      Added value: +"attach (default): halts the core, no reset. reset_halt: resets, halts; needs allow_reset. load: resets, flashes the ELF, resets, halts; needs allow_reset and allow_flash, not allow_mass_erase."
    • addedInput schema / properties / timeout_s / description
      Added value: +"Seconds. Default and ceiling: the debugger entry's timeout_s (60 unless set); 0.1 at least. Bounds the debug server's start and each GDB step (10 s at most). Expiry: timeout."
  2. First observedv0.22.1-dev.0

TDQS

A4.4/5.0
Behavior5/5

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

Annotations cover safety/idempotency, yet the description adds substantial context beyond them: prerequisites (GDB executable, entry scripts, allow_raw_debugger_commands off), the halted-state outcome, the exact return fields (session status, stop_reason, log_path), and the session_already_active failure mode on a second start. This is exactly the extra behavioral disclosure the bar rewards.

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?

Dense but front-loaded: purpose and consumer tools come first, then backend/prerequisite constraints, then return and error semantics. Five sentences all carry information, though the prerequisite clause is slightly compressed.

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?

With no output schema, the description steps in to describe the return shape (halted session with status/stop_reason, log_path) and the primary error case. Combined with the prerequisites and backend constraint, an agent has everything needed to call this mutation tool correctly.

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 mode, timeout_s, image_path and artifact_id are already fully documented in the schema, including enum meanings and the either/or constraint. The description adds no parameter-level detail beyond referencing allow_reset/allow_flash, so the baseline of 3 applies.

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 (opens a GDB session on an ELF) and immediately scopes its purpose to debug_continue/debug_halt. It is clearly distinguishable from siblings debug_get_session_status and debug_stop_session, which it names explicitly.

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?

Gives a clear usage context (needed for debug_continue and debug_halt), a backend exclusion ('OpenOCD backend only; others answer not_supported'), and routes to the sibling that inspects it and the one that ends it. No explicit 'use X instead of Y' branch for alternative start paths, but the surrounding guidance is strong.

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