Skip to main content
Glama

get_stack_trace

Retrieves the current stack trace for a paused debugging session, filtering internal frames by default and reporting why execution stopped.

Instructions

Get stack trace. The response includes stopReason — why the session is paused. For an implicit frameless stopped thread, a sibling with policy-recognized user frames is preferred and adopted, with the switch disclosed in note. Internal/runtime frames are filtered by default; when any are hidden the response carries hiddenFrames and a note. When the frame the program is paused in is itself internal, pausedFrame names it (kept: whether it was retained as stackFrames[0]) and the note says so. The note also says when the top frame's file is newer than the compiled file the debugger binds it through (a stale build)

Input Schema

NameRequiredDescriptionDefault
threadIdNoInspect this exact thread (ids from list_threads). Explicit selection is authoritative and is never silently switched
sessionIdYes
includeInternalsNoInclude internal/framework frames (e.g., Node.js internals, node_modules dependencies, async separators). Default: false for cleaner output.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed2 schema fields changedv0.25.1
    • changedInput schema / properties / includeInternals / description
      Previous value: -"Include internal/framework frames (e.g., Node.js internals). Default: false for cleaner output."New value: +"Include internal/framework frames (e.g., Node.js internals, node_modules dependencies, async separators). Default: false for cleaner output."
    • addedInput schema / properties / threadId
      Added value: +{
      +  "description": "Inspect this exact thread (ids from list_threads). Explicit selection is authoritative and is never silently switched",
      +  "type": "number"
      +}
  2. First observed

TDQS

B3.3/5.0
Behavior4/5

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

With no annotations, the description carries the behavioral burden and does substantial work: it explains default filtering of internal/runtime frames, hiddenFrames and note reporting, pausedFrame handling when the paused frame is internal, stale-build disclosure, and implicit thread adoption. It does not explicitly state that the operation is read-only or side-effect-free, which keeps it from a 5.

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

Conciseness3/5

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

The description is front-loaded with the core action, but it becomes a dense paragraph of debugging jargon such as "implicit frameless stopped thread" and "policy-recognized user frames." Much of the content earns its place, but the structure could be clearer and more scannable.

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?

Because there is no output schema, the description usefully explains return fields like stopReason, hiddenFrames, note, and pausedFrame. However, it omits basic operational context such as the required sessionId and when to choose this tool over related debugging tools.

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 coverage is 67%, with threadId and includeInternals documented in the schema. The description adds some meaning around internal-frame filtering and hidden-frame reporting, but sessionId is not described in either the schema or the description, and the description does not clarify its required role.

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 opening sentence gives a specific verb and resource: "Get stack trace." It also says the response includes stopReason, clarifying the debugging context. It does not explicitly differentiate itself from nearby siblings such as get_scopes or get_variables, so it stops short of 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 Guidelines2/5

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

The description does not say when an agent should call get_stack_trace versus alternatives like list_threads, get_scopes, or get_variables. It mentions one internal edge case involving an implicit frameless stopped thread, but that is response behavior rather than user-facing usage guidance.

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