Skip to main content
Glama

debug_backtrace

Shows a kernel call stack by walking frame pointers or scanning for return addresses, helping diagnose execution paths in bare-metal QEMU debugging.

Instructions

Show the call stack.

mode "fp" walks the frame-pointer chain (exact, but only if the kernel was built with frame pointers, e.g. -fno-omit-frame-pointer); "scan" scans the stack for return addresses (works on -O2 kernels without frame pointers, x86 only, needs elf; may include stale frames); "auto" tries fp and falls back to scan if the chain is empty.

Tool call template

Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {
      "name": "<name>"
    },
    "name": "debug_backtrace"
  }
}

Input Schema

NameRequiredDescriptionDefault
modeNoauto
nameYes
max_framesNo

Output Schema

NameRequiredDescriptionDefault
resultYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

B3.4/5.0
Behavior3/5

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

With no annotations, the description carries the burden and does disclose real behavioral caveats: fp is exact only when built with frame pointers, scan is x86-only, needs elf, and may include stale frames. It does not cover whether the target must be paused/attached, whether the call fails or returns empty at the top level, or any safety profile for what is presumably a read of live process state.

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 one-line purpose followed by per-mode detail, with no filler sentences. The nested quoting of mode values is slightly awkward to read but does not waste space.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness3/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

An output schema exists, so return-value explanation is rightly omitted, and mode semantics are strong. Still missing for a debugger tool: what "name" identifies (session? process? symbol?), the meaning/cap of max_frames, and any required session state — meaningful gaps given zero annotation and zero schema-description support.

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 fully documents the mode parameter's three values and their tradeoffs, which is the most valuable addition. The required "name" parameter and "max_frames" are left unexplained, so a third of the parameters remain ambiguous despite the useful mode coverage.

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?

Opens with a specific verb+resource: "Show the call stack." That is clearly distinguishable from siblings like debug_registers or debug_memory. It stops short of naming any sibling or stating scope constraints (e.g. which target/session the stack belongs to), so it is clear but not fully differentiated.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines3/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description gives good mode-selection guidance (fp vs scan vs auto, with fallback behavior), which is genuinely useful for choosing how to call it. It gives no tool-level guidance, however: nothing says when to prefer this over debug_registers/debug_step, or what preconditions (attached session, stopped target) must hold.

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