Skip to main content
Glama

get_stack_trace

Retrieve the call stack and stop reason for a paused debug session to see why execution halted. Filters internal frames by default; optionally include them or inspect a specific thread.

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

Input Schema

TableJSON 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

A3.6/5.0
Behavior4/5

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

With no annotations, the description carries the full burden, and it discloses substantial behavior beyond the input schema: automatic adoption of a sibling thread when frameless, default filtering of internal frames, and the hiddenFrames/pausedFrame/note signaling. Missing is any mention of permissions or error behavior, but the response-contract disclosure is strong.

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?

Front-loaded with the purpose statement, and each sentence conveys contract detail. However, the sentences are long, comma-chained, and jargon-heavy, making the disclosure harder to parse than it needs to be.

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?

There is no output schema, so the description must explain return values, and it does so thoroughly (stopReason, hiddenFrames, pausedFrame, kept, note). The gap is that it does not ground the tool in the debugging workflow, but for a read tool it is substantially complete.

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%, so the schema largely documents threadId and includeInternals. The description reinforces threadId's authoritative, never-silently-switched semantics but adds little on sessionId or the exact meaning of includeInternals' frame categories. Baseline 3 fits.

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 clear verb+resource ("Get stack trace") and immediately scopes what the response contains (stopReason, frameless-thread handling, filtered frames). It never explicitly distinguishes itself from siblings like get_source_context or get_variables, so it loses the top mark, but the purpose is unambiguous.

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?

Usage is only implied: the reader infers this is the tool for inspecting a paused session's call stack. It describes thread-selection behavior (explicit threadId is authoritative, implicit threads may be swapped) but gives no explicit when-to-use versus alternatives and no prerequisites.

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