Skip to main content
Glama

Capture Runtime Debug Snapshot

debug_snapshot
Read-onlyIdempotent

Capture bounded raw evidence from the current stopped debug state—stack, locals, registers, exception details, modules, and nearby instructions—without resuming execution.

Instructions

Capture bounded evidence from the current stopped debug state without resuming execution. Use this when an agent needs raw stack, locals, registers, exception details, modules, or nearby instructions; prefer debug_diagnose_stop when you also want ranked crash hypotheses and project-frame selection. This is read-only with respect to the debuggee and returns best-effort evidence plus collection errors for optional data that an adapter cannot provide.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
threadIdNoStopped DAP thread to inspect; omit to use the session-selected stopped thread.
sessionIdNoOptional DAP session ID. Omit to use the backward-compatible default session.
moduleCountNoMaximum loaded modules to return when includeModules is true.
stackLevelsNoMaximum number of stack frames to include, from the selected thread top downward.
includeModulesNoInclude a bounded list of loaded executable images and libraries.
disassembleAfterNoNumber of instructions after the current instruction to request when disassembly is enabled.
disassembleBeforeNoNumber of instructions before the current instruction to request when disassembly is enabled.
includeDisassemblyNoInclude best-effort instructions around the selected frame instruction pointer when supported.
includeExceptionInfoNoInclude structured exception information for the stopped thread when the adapter supports it.
maxVariablesPerScopeNoMaximum variables returned per inspected scope, bounding output size.

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
frameYes
stackYes
localsYes
scopesYes
threadYes
modulesNo
stoppedNo
exceptionNo
registersYes
postmortemNo
disassemblyNo
symbolHealthYes
collectionErrorsNo

Schema Changelog

Changes observed during successful MCP inspections. Dates show when Glama detected each change.

  1. Changed2 schema fields changedv0.17.0
    • addedInput schema / properties / sessionId
      Added value: +{
      +  "description": "Optional DAP session ID. Omit to use the backward-compatible default session.",
      +  "maxLength": 64,
      +  "minLength": 1,
      +  "pattern": "^[A-Za-z0-9][A-Za-z0-9._-]{0,63}$",
      +  "type": "string"
      +}
    • changedOutput schema / (root)
      Previous value: -nullNew value: +{
      +  "$schema": "https://json-schema.org/draft/2020-12/schema",
      +  "additionalProperties": {},
      +  "properties": {
      +    "collectionErrors": {
      +      "items": {
      +        "additionalProperties": false,
      +        "properties": {
      +          "message": {
      +            "type": "string"
      +          },
      +          "operation": {
      +            "type": "string"
      +          }
      +        },
      +        "required": [
      +          "operation",
      +          "message"
      +        ],
      +        "type": "object"
      +      },
      +      "type": "array"
      +    },
      +    "disassembly": {
      +      "items": {},
      +      "type": "array"
      +    },
      +    "exception": {},
      +    "frame": {
      +      "additionalProperties": {},
      +      "properties": {
      +        "column": {
      +          "maximum": 9007199254740991,
      +          "minimum": -9007199254740991,
      +          "type": "integer"
      +        },
      +        "id": {
      +          "maximum": 9007199254740991,
      +          "minimum": -9007199254740991,
      +          "type": "integer"
      +        },
      +        "line": {
      +          "maximum": 9007199254740991,
      +          "minimum": -9007199254740991,
      +          "type": "integer"
      +        },
      +        "name": {
      +          "type": "string"
      +        },
      +        "source": {}
      +      },
      +      "required": [
      +        "id",
      +        "name",
      +        "line",
      +        "column"
      +      ],
      +      "type": "object"
      +    },
      +    "locals": {
      +      "items": {},
      +      "type": "array"
      +    },
      +    "modules": {
      +      "items": {},
      +      "type": "array"
      +    },
      +    "postmortem": {
      +      "type": "boolean"
      +    },
      +    "registers": {
      +      "items": {},
      +      "type": "array"
      +    },
      +    "scopes": {
      +      "items": {},
      +      "type": "array"
      +    },
      +    "stack": {
      +      "items": {
      +        "additionalProperties": {},
      +        "properties": {
      +          "column": {
      +            "maximum": 9007199254740991,
      +            "minimum": -9007199254740991,
      +            "type": "integer"
      +          },
      +          "id": {
      +            "maximum": 9007199254740991,
      +            "minimum": -9007199254740991,
      +            "type": "integer"
      +          },
      +          "line": {
      +            "maximum": 9007199254740991,
      +            "minimum": -9007199254740991,
      +            "type": "integer"
      +          },
      +          "name": {
      +            "type": "string"
      +          },
      +          "source": {}
      +        },
      +        "required": [
      +          "id",
      +          "name",
      +          "line",
      +          "column"
      +        ],
      +        "type": "object"
      +      },
      +      "type": "array"
      +    },
      +    "stopped": {},
      +    "symbolHealth": {
      +      "additionalProperties": false,
      +      "properties": {
      +        "limitations": {
      +          "items": {
      +            "type": "string"
      +          },
      +          "type": "array"
      +        },
      +        "modules": {
      +          "additionalProperties": false,
      +          "properties": {
      +            "collected": {
      +              "type": "boolean"
      +            },
      +            "symbolsAvailable": {
      +              "maximum": 9007199254740991,
      +              "minimum": 0,
      +              "type": "integer"
      +            },
      +            "symbolsMissing": {
      +              "maximum": 9007199254740991,
      +              "minimum": 0,
      +              "type": "integer"
      +            },
      +            "symbolsUnknown": {
      +              "maximum": 9007199254740991,
      +              "minimum": 0,
      +              "type": "integer"
      +            },
      +            "totalModules": {
      +              "maximum": 9007199254740991,
      +              "minimum": 0,
      +              "type": "integer"
      +            },
      +            "withExplicitStatus": {
      +              "maximum": 9007199254740991,
      +              "minimum": 0,
      +              "type": "integer"
      +            }
      +          },
      +          "required": [
      +            "collected",
      +            "totalModules",
      +            "withExplicitStatus",
      +            "symbolsAvailable",
      +            "symbolsMissing",
      +            "symbolsUnknown"
      +          ],
      +          "type": "object"
      +        },
      +        "stack": {
      +          "additionalProperties": false,
      +          "properties": {
      +            "namedFrames": {
      +              "maximum": 9007199254740991,
      +              "minimum": 0,
      +              "type": "integer"
      +            },
      +            "sourceMappedFrames": {
      +              "maximum": 9007199254740991,
      +              "minimum": 0,
      +              "type": "integer"
      +            },
      +            "topFrameNamed": {
      +              "type": "boolean"
      +            },
      +            "topFrameSourceMapped": {
      +              "type": "boolean"
      +            },
      +            "totalFrames": {
      +              "maximum": 9007199254740991,
      +              "minimum": 0,
      +              "type": "integer"
      +            }
      +          },
      +          "required": [
      +            "totalFrames",
      +            "namedFrames",
      +            "sourceMappedFrames",
      +            "topFrameNamed",
      +            "topFrameSourceMapped"
      +          ],
      +          "type": "object"
      +        },
      +        "status": {
      +          "enum": [
      +            "good",
      +            "partial",
      +            "poor",
      +            "unknown"
      +          ],
      +          "type": "string"
      +        },
      +        "summary": {
      +          "type": "string"
      +        }
      +      },
      +      "required": [
      +        "status",
      +        "summary",
      +        "stack",
      +        "modules",
      +        "limitations"
      +      ],
      +      "type": "object"
      +    },
      +    "thread": {
      +      "additionalProperties": {},
      +      "properties": {
      +        "id": {
      +          "maximum": 9007199254740991,
      +          "minimum": -9007199254740991,
      +          "type": "integer"
      +        },
      +        "name": {
      +          "type": "string"
      +        }
      +      },
      +      "required": [
      +        "id",
      +        "name"
      +      ],
      +      "type": "object"
      +    }
      +  },
      +  "required": [
      +    "thread",
      +    "stack",
      +    "frame",
      +    "scopes",
      +    "locals",
      +    "registers",
      +    "symbolHealth"
      +  ],
      +  "type": "object"
      +}
  2. Changed9 schema fields changedv0.12.1
    • addedInput schema / properties / disassembleAfter / description
      Added value: +"Number of instructions after the current instruction to request when disassembly is enabled."
    • addedInput schema / properties / disassembleBefore / description
      Added value: +"Number of instructions before the current instruction to request when disassembly is enabled."
    • addedInput schema / properties / includeDisassembly / description
      Added value: +"Include best-effort instructions around the selected frame instruction pointer when supported."
    • addedInput schema / properties / includeExceptionInfo / description
      Added value: +"Include structured exception information for the stopped thread when the adapter supports it."
    • addedInput schema / properties / includeModules / description
      Added value: +"Include a bounded list of loaded executable images and libraries."
    • addedInput schema / properties / maxVariablesPerScope / description
      Added value: +"Maximum variables returned per inspected scope, bounding output size."
    • addedInput schema / properties / moduleCount / description
      Added value: +"Maximum loaded modules to return when includeModules is true."
    • addedInput schema / properties / stackLevels / description
      Added value: +"Maximum number of stack frames to include, from the selected thread top downward."
    • addedInput schema / properties / threadId / description
      Added value: +"Stopped DAP thread to inspect; omit to use the session-selected stopped thread."
  3. First observedv0.6.0

TDQS

A4.7/5.0
Behavior5/5

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

Annotations already provide readOnlyHint, idempotentHint, and destructiveHint, but the description adds meaningful behavioral context: it is read-only with respect to the debuggee, returns best-effort evidence, and includes collection errors for optional data an adapter cannot provide. This clarifies failure behavior and optionality beyond what annotations express.

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?

Three sentences with no wasted words: the first states the core action and constraint, the second gives usage routing, and the third discloses read-only, best-effort, and error behavior. Information is front-loaded and every sentence earns its place.

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 tool with 10 optional parameters and an output schema, the description covers the essential decision factors: what it returns, when to use it versus the closest sibling, that it is read-only, and how optional failures are reported. Return-value details are rightfully left to the output schema.

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%, so the schema carries full parameter documentation. The description adds conceptual grouping by naming the kinds of evidence collected (stack, locals, registers, exception details, modules, nearby instructions), which maps to several parameters, but it does not add per-parameter semantics beyond the schema. Baseline 3 is appropriate.

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

Purpose5/5

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

States a specific verb ('Capture'), a specific resource ('bounded evidence from the current stopped debug state'), and a key constraint ('without resuming execution'). It also distinguishes itself from debug_diagnose_stop by describing the division of labor, so an agent can tell them apart without inspecting schemas.

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?

Explicitly states when to use: when raw stack, locals, registers, exception details, modules, or nearby instructions are needed. It also names the alternative (debug_diagnose_stop) and gives the condition that should route to that sibling (ranked crash hypotheses and project-frame selection). No inference is required.

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

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/SLP-DEV1/qwen-dap-mcp'

If you have feedback or need assistance with the MCP directory API, please join our Discord server