Skip to main content
Glama
spk-c
by spk-c

Debug This Crash

debug_this_crash
Destructive

Diagnose native crashes by inspecting stopped sessions or core dumps, verifying fixes against baselines, and running bounded autonomous debug cycles.

Instructions

Preferred high-level native crash workflow. Use mode=current for an already stopped session, dump for read-only postmortem analysis, codelldb to discover CodeLLDB, lldb-dap to discover upstream LLVM lldb-dap, gdb to discover GNU GDB built-in DAP interpreter, or live with an already initialized generic DAP adapter. Do not use codelldb/lldb-dap/gdb/live when executing or attaching to the target is not authorized: those modes can run application code and cause its normal side effects, while current/dump only inspect stopped evidence. workflow.stage selects initial diagnosis, verification against a prior baseline, or the bounded autonomous cycle. Returns runtime evidence, diagnosis, verification/autonomous metadata, and debugger status with deterministic fixed/blocked/budget-exhausted outcomes where applicable.

Input Schema

NameRequiredDescriptionDefault
cwdNoWorking directory for the selected debugger/target launch and a project-root hint for diagnosis.
envNoEnvironment variables supplied to the launched program in codelldb/lldb-dap/gdb modes.
argsNoCommand-line arguments passed to the launched program in codelldb/lldb-dap/gdb modes.
modeNocurrent inspects an existing stop; live uses an initialized generic DAP session; codelldb starts CodeLLDB; lldb-dap starts upstream LLVM lldb-dap; gdb starts GNU GDB with --interpreter=dap; dump opens a frozen core/minidump.current
programNoRequired for codelldb/lldb-dap/gdb launch modes; optional for CodeLLDB/GDB dumps but required when dumpAdapter=lldb-dap. Local path to the native executable.
requestNoFor mode=live, choose whether the initialized DAP adapter launches a target or attaches to an existing authorized target.launch
analysisNoHints used to distinguish project code from runtime, system, or third-party frames.
dumpPathNoRequired for mode=dump: local path to the native core/minidump file.
snapshotNoBounds and optional evidence categories for a runtime crash snapshot.
workflowNoControls one-shot diagnosis, explicit verification, or the bounded autonomous crash workflow.
sessionIdNoOptional DAP session ID. Omit to use the backward-compatible default session.
sourceMapNoFor mode=dump, map source paths stored in debug symbols to local source paths.
timeoutMsNoMaximum milliseconds to wait for the reproduction to stop, exit, or terminate.
adapterPathNoOptional explicit debugger executable/adapter path for codelldb/lldb-dap/gdb/dump modes; omit to auto-discover the selected adapter.
breakpointsNoOptional source breakpoints configured before a live/codelldb reproduction completes setup.
dumpAdapterNoFor mode=dump, choose CodeLLDB, upstream LLVM lldb-dap coreFile loading, or GNU GDB coreFile attach semantics.codelldb
stopOnEntryNoWhen true in codelldb/lldb-dap/gdb modes, request an initial debugger stop at program entry before normal execution.
configurationNoRequired for mode=live: adapter-specific DAP launch/attach configuration.
requestTimeoutMsNoPer-request DAP timeout in milliseconds for the selected debugger adapter.

Output Schema

NameRequiredDescriptionDefault
modeYes
statusYes
workflowNo
diagnosisNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.19.0

TDQS

A4.5/5.0
Behavior5/5

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

Beyond the destructiveHint=true annotation, the description discloses mode-specific side effects: codelldb/lldb-dap/gdb/live 'can run application code and cause its normal side effects, while current/dump only inspect stopped evidence.' It also states the deterministic outcomes (fixed/blocked/budget-exhausted), which is valuable behavioral context an agent cannot infer from the schema alone.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is about five dense sentences, each carrying a distinct job: purpose, mode routing, safety exclusion, workflow stage selection, and return content. It is front-loaded with the core purpose and avoids restating schema details, making it very efficient for a tool with 19 parameters and nested objects.

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 highly complex tool, the description covers the key decisions an agent must make: which mode to select, when execution is unsafe, which workflow stage to use, and what the tool returns. The remaining parameter details and return shape are handled by the rich input and output schemas, so nothing essential is missing.

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% and the parameter descriptions in the schema are already rich, so the baseline is 3. The tool description adds high-level grouping around mode safety and workflow stages but does not add meaningful per-parameter semantics beyond what the schema already provides.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly identifies the tool as a 'preferred high-level native crash workflow' and enumerates the concrete modes (current, dump, codelldb, lldb-dap, gdb, live), so an agent knows what operation it performs. It does not explicitly differentiate itself from sibling tools like debug_open_dump or debug_diagnose_stop by name, which keeps it from a 5.

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?

The description gives explicit routing guidance for every mode, including an explicit exclusion: 'Do not use codelldb/lldb-dap/gdb/live when executing or attaching to the target is not authorized.' It also explains why those modes are risky and why current/dump are safer, and maps workflow.stage to diagnose, verify, and autonomous behaviors.

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