GDB MI (Machine Interface) debugging server exposing GDB functionality via MCP tools for multi-session debugging with breakpoints, execution control, state inspection, and symbol resolution
GdbMiBridge demonstrates solid tool design with comprehensive parameter descriptions and clear naming conventions. All 36 tools follow verb_noun patterns (SetBreakpoint, GetRegisters, etc.). Descriptions are detailed and contextual, averaging ~150 chars and explaining WHAT, WHEN, and prerequisites. Input schemas are fully visible with typed parameters and descriptions. However, output schemas are not documented in the source, return types are inferred from method signatures (e.g., BreakpointConfig, bool, List<BreakpointConfig>) but lack formal schema documentation. Error handling is present via exception catching in CallToolFilters but lacks actionable recovery guidance in tool descriptions. No tool annotations (readOnlyHint/destructiveHint) visible despite clear risk classifications in the metadata.
Look up the symbol name for an address.
Attach to a running process by PID.
Manually capture program state at the current stop point. Unlike breakpoint auto-capture, this captures on-demand whenever you need a snapshot. By default captures variables only; override with parameters for registers and call stack.
Clear all accumulated capture snapshots.
Create a debugging session by launching an executable.
Detach from the debugged process, leaving it running.
Disable a breakpoint without removing it.
Disassemble instructions at an address or symbol. Returns approximate count of instructions (variable-length ISAs may differ).
Output schemas not documented. Return types inferred from method signatures (BreakpointConfig, List<BreakpointConfig>, bool) but no formal schema definitions visible. LLMs cannot plan downstream tool calls without knowing response structure.
Tool annotations missing. Risk classifications (WRITE, READ_ONLY, DESTRUCTIVE) exist in metadata but no readOnlyHint, destructiveHint, or idempotentHint attributes visible in tool definitions. Agents cannot infer safety properties.
Error handling lacks actionable recovery guidance. CallToolFilters catches exceptions and returns error text, but tool descriptions do not include 'what to do next' hints. E.g., SetBreakpoint could fail if location is invalid, description should suggest 'Use resolve_symbol() to verify the address.'
Inferred effective spec: <=2025-11-25.
| Scored | Grade | Overall | Spec posture | Rubric |
|---|---|---|---|---|
| 2026-09-23 | F | 48 | <=2025-11-25 | v2 |
Enable a breakpoint.
Search for symbols matching a pattern.
Get the call stack.
Get all accumulated capture snapshots.
Query the current default capture granularity. Returns a CaptureGranularity object with Registers (none/basic/full), CallStack (bool), and Variables (bool) fields. Use this before set_default_capture_granularity to check current settings.
Get local variables AND function arguments for a stack frame. Frame 0 is the current/innermost frame. Returns name, type, and value for each variable.
Get the program counter with symbol info.
Get CPU register values with human-readable names (e.g. 'rax' on x64, 'x0' on ARM64). Use preset='basic' for only the most commonly needed registers (~16), or 'full' for all 176+ registers including SIMD/vector.
Continue execution until next stop event or timeout. Returns stop reason: 'breakpoint-hit', 'watchpoint-trigger', 'exited-normally', 'end-stepping-range', 'function-finished', 'signal-received', or 'timeout'.
Run to a specified location using a temporary breakpoint. Returns stop reason (see Go).
List all breakpoints in the current session.
List loaded shared libraries.
List all active debug sessions.
List all threads.
Load a core dump file for post-mortem analysis.
Execute an arbitrary GDB command (MI or CLI).
Read memory at the given address.
Remove a breakpoint by ID.
Resolve a symbol name to its address.
Select the default debug session for subsequent tool calls.
Set a breakpoint at a function, file:line, or address. Returns a BreakpointConfig with ID for later remove/enable/disable. When capture=true, the granularity params below control WHAT state is captured on hit.
Configure the default capture granularity for the entire session. This applies to ALL breakpoints that do not specify their own granularity override. Call this once at session start to set your debugging strategy — e.g., 'I only need variables' (fast) or 'I need everything' (detailed). Individual breakpoints can still override with set_breakpoint's capture_registers/capture_call_stack/capture_variables params.
Set a hardware data breakpoint (watchpoint) that triggers on memory access. Use resolve_symbol first to find a variable's address. Watchpoints are limited (typically 4 hardware slots). Returns a BreakpointConfig with ID.
Query the current debug session status. Returns 'Stopped', 'Running', or 'Exited'.
Single-step into the next instruction (enters function calls). Returns stop reason (see Go).
Execute until the current function returns. Returns stop reason (see Go).
Single-step over the current line (skips function calls). Returns stop reason (see Go).
Terminate the debugged process and clean up the session.
RawGdb tool is overly permissive. Accepts arbitrary GDB commands with no validation or constraints. Description lacks warnings about injection risks or guidance on when to use it vs. domain-specific tools. Agents may misuse it instead of calling SetBreakpoint.
Pagination not implemented. ListBreakpoints, ListSessions, ListThreads, FindSymbols return unbounded lists. No limit, offset, or cursor parameters. Large result sets could exhaust context window.