Skip to main content
Glama

Diagnose Current Debug Stop

debug_diagnose_stop
Read-onlyIdempotent

Diagnose a stopped live or postmortem debug session read-only: crash classification, variable/register bindings, call-chain provenance, ranked hypotheses, and a fix/rebuild/reproduce/verify plan.

Instructions

Diagnose an already stopped live or postmortem debug session without changing execution state. Use this when a debugger has captured the failure and you want project-frame selection, crash classification, operand/register/variable bindings, call-chain provenance, ranked hypotheses, and a fix/rebuild/reproduce/verify plan; use debug_snapshot instead when only raw evidence is needed. The tool is read-only and returns both the bounded snapshot and the derived diagnosis, including collection limitations when optional debugger evidence is unavailable.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
analysisNoHints used to distinguish project code from runtime, system, or third-party frames.
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 include when module collection is enabled.
stackLevelsNoMaximum number of stack frames to inspect when collecting crash evidence.
includeModulesNoInclude a bounded list of loaded executable images and libraries.
disassembleAfterNoNumber of instructions after the selected instruction to request.
disassembleBeforeNoNumber of instructions before the selected instruction to request.
includeDisassemblyNoInclude best-effort disassembly around the selected instruction pointer when supported.
includeExceptionInfoNoRequest structured exception information for the stopped thread when supported.
maxVariablesPerScopeNoMaximum variables returned per inspected scope, bounding evidence size.

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
snapshotYes
diagnosisYes

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": {
      +    "diagnosis": {},
      +    "snapshot": {
      +      "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"
      +    }
      +  },
      +  "required": [
      +    "snapshot",
      +    "diagnosis"
      +  ],
      +  "type": "object"
      +}
  2. Changed13 schema fields changedv0.12.1
    • addedInput schema / properties / analysis / description
      Added value: +"Hints used to distinguish project code from runtime, system, or third-party frames."
    • addedInput schema / properties / analysis / properties / callerDepth / description
      Added value: +"How many project-controlled caller frames beyond the selected frame to inspect for provenance and root cause."
    • addedInput schema / properties / analysis / properties / projectModules / description
      Added value: +"Optional executable or library names treated as project-controlled modules during frame selection."
    • addedInput schema / properties / analysis / properties / projectRoots / description
      Added value: +"Optional local source-root paths used to recognize project-controlled stack frames."
    • addedInput schema / properties / disassembleAfter / description
      Added value: +"Number of instructions after the selected instruction to request."
    • addedInput schema / properties / disassembleBefore / description
      Added value: +"Number of instructions before the selected instruction to request."
    • addedInput schema / properties / includeDisassembly / description
      Added value: +"Include best-effort disassembly around the selected instruction pointer when supported."
    • addedInput schema / properties / includeExceptionInfo / description
      Added value: +"Request structured exception information for the stopped thread when supported."
    • 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 evidence size."
    • addedInput schema / properties / moduleCount / description
      Added value: +"Maximum loaded modules to include when module collection is enabled."
    • addedInput schema / properties / stackLevels / description
      Added value: +"Maximum number of stack frames to inspect when collecting crash evidence."
    • addedInput schema / properties / threadId / description
      Added value: +"Stopped DAP thread to inspect; omit to use the session-selected stopped thread."
  3. Addedv0.12.0

TDQS

A4.4/5.0
Behavior4/5

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

Annotations already declare readOnlyHint, idempotentHint, and destructiveHint=false, so the bar is lower. The description adds value beyond those by stating that it 'does not change execution state', that it returns both a bounded snapshot and a derived diagnosis, and that it discloses collection limitations when optional debugger evidence is unavailable. This gives useful behavioral context beyond the structured annotations.

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?

The description is dense but tightly structured: it front-loads the core purpose, lists the derived outputs, routes to the sibling alternative, and closes with read-only behavior and output scope. Every clause contributes, and there is no redundant repetition of the tool name or schema contents.

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?

For a tool with 11 parameters, nested objects, no required parameters, and an output schema, the description covers the key operational context: the precondition ('already stopped'), the read-only guarantee, the distinction from debug_snapshot, and the bounded/limited nature of results. It does not enumerate parameter details, but the input schema fully covers those, so the description is sufficiently 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 description coverage is 100%, so the schema already documents every parameter in detail. The description does not add parameter-specific semantics, but it does contextualize the optional evidence gathering and bounded results, which relates to the parameters. Baseline 3 is appropriate because the schema carries the parameter documentation burden.

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?

The description names a specific verb ('Diagnose'), a precise resource ('already stopped live or postmortem debug session'), and a concrete set of outputs (project-frame selection, crash classification, bindings, provenance, ranked hypotheses, fix plan). It also explicitly differentiates itself from debug_snapshot, so an agent can distinguish it from siblings without opening 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?

The description gives a clear when-to-use condition ('when a debugger has captured the failure and you want...') and names the alternative (debug_snapshot) with the condition that selects it ('when only raw evidence is needed'). This is explicit routing guidance rather than leaving the choice to inference.

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