Skip to main content
Glama

debugger_stack

Read-only

Reads a bounded page of stack frames from a suspended debug session and thread, using a stop token to target the expected generation.

Instructions

Read a stack page from the expected suspended generation.

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": {
      "session_id": "<session_id>",
      "thread": "<thread>",
      "stop": "<stop>"
    },
    "name": "debugger_stack"
  }
}

Input Schema

NameRequiredDescriptionDefault
pageNo
stopYes
threadYes
timeoutNo
session_idYes

Output Schema

NameRequiredDescriptionDefault
totalNo
framesYes
snapshotYes
next_startNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. Addedv0.5.1

TDQS

C2.8/5.0
Behavior3/5

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

Annotations already declare readOnlyHint=true and destructiveHint=false, so safety is covered. The description adds the meaningful behavioral point that the call is gated on an expected suspended generation, implying a staleness check that fails after resume, though it never says what happens on mismatch or whether results are cached.

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?

A single short sentence with no filler, and the precondition is stated up front. It is terse rather than bloated, though that terseness is the source of the gaps elsewhere.

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

Completeness2/5

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

For a five-parameter tool with nested objects and a mandatory generation token, one sentence is far too thin: it omits the paging behavior of the stack, the ordering of frames, how to obtain session_id/thread handle, and the failure mode when the generation is stale. An output schema exists, so return-shape explanation is not required, but the invocation contract is incomplete.

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 reported as 0% at the top level (nested $defs carry some text), so the description must compensate and largely does not: the count/start paging window, timeout, and ThreadRef handle are unexplained. It only clarifies that stop.generation is the 'expected' suspended generation, which is one useful semantic out of five parameters.

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

Purpose3/5

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

States a verb and resource ('Read a stack page'), but 'stack page' is never grounded — it is unclear whether this returns frames, threads, or variables, and nothing distinguishes it from debugger_threads, debugger_scopes, or debugger_variables. The only differentiator is the generation check, which describes a precondition rather than the purpose.

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?

No guidance on when to call this versus the sibling stack-related tools, and no statement of prerequisites beyond an implied 'session must be suspended'. The agent must infer that debugger_threads precedes this call to obtain a ThreadRef.

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