get_state
Inspects the current debug session state: returns stack traces, scopes, and variables when stopped, or status and buffered output while running.
Instructions
Get the current state of a debug session. If stopped, returns full stack/scopes/variables. If running, returns status and buffered output.
Tool call template
This tool declares no required parameters. Add optional parameters from the input schema as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {},
"name": "get_state"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| depth | No | Stack trace depth (default: 10) | |
| detail | No | 'full' (default) or 'compact' (frame-local scopes only, slimmer JSON) | |
| scopes | No | Scope names to fetch, e.g. ['Registers']. Default: every scope except CPU registers; skipped ones are listed in omittedScopes | |
| timeout | No | If running, wait up to this many milliseconds for the program to stop (default: 0 = don't wait) | |
| threadId | No | Thread ID (uses stopped thread if omitted) | |
| sessionId | No | Session ID (omit if only one session is active) | |
| variableDepth | No | Variable expansion depth (default: 1) |