Skip to main content
Glama

pio_debug_start

Start a live GDB debugging session on a board through its debug probe. It launches the configured debug server, builds and loads debug firmware, then halts execution at main for immediate inspection.

Instructions

Open a live gdb session on the board through its debug probe (pio debug --interface=gdb, GDB/MI over pipes): starts the debug server (OpenOCD, J-Link, ST-Link, esp-prog, ...) from debug_tool in platformio.ini, builds a debug firmware, loads it (load=true) and halts at debug_init_break (default: main). Returns session_id, the .pioinit script PlatformIO generated, and the initial stop frame. The session holds the probe: stop it (pio_debug_stop) before pio_upload or pio_flash_and_verify. Blocked under build_only/read_only policy.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
envNo
loadNo
timeout_sNo
project_dirNo

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Schema Changelog

Changes observed during successful MCP inspections.

  1. Addedv0.2.0

TDQS

A4.3/5.0
Behavior5/5

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

With no annotations provided, the description carries the full burden and does so thoroughly. It discloses side effects (starts external debug server, builds firmware, loads it, halts at debug_init_break), resource holding (probe), and policy restrictions. No contradiction with annotations exists.

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?

The description is dense but every sentence earns its place: purpose, workflow, return values, side effects, and policy. It is front-loaded with the main action. Slightly overloaded with parenthetical details, but still well-structured and readable.

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 complex, stateful tool with no annotations, this is quite complete: it covers what the tool does, what it returns, what side effects it has, and how it interacts with sibling tools. Minor gaps remain around parameter details and prerequisites, but the presence of an output schema reduces the need to describe return structure.

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 0%, so the description must compensate. It does connect load to 'loads it (load=true)' and references debug_tool in platformio.ini, but it does not explain env, timeout_s, or project_dir beyond their self-evident names. This is adequate but incomplete compensation.

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?

Description states a specific verb and resource: 'Open a live gdb session on the board through its debug probe'. It explains the full workflow (start debug server, build firmware, load, halt) and is clearly distinguishable from siblings like pio_debug_cmd, pio_debug_stop, and pio_debug_list.

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 explicit operational context: the session holds the probe, so pio_debug_stop must be called before pio_upload or pio_flash_and_verify, and the tool is blocked under build_only/read_only policy. It does not explicitly contrast with pio_debug_cmd or pio_debug_list, but the usage context is clear.

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