get_debugger_stack
Retrieve the current call stack from the SAP debugger to analyze program execution flow and identify the context of active procedures.
Instructions
Get the current call stack in the debugger
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| system_id | No | SAP system ID (e.g. DEV). Omit to use default system. |
Implementation Reference
- src/adt-client.ts:523-534 (handler)The AdtClient.debuggerGetStack() method is the core handler. It makes a POST request to /sap/bc/adt/debugger?method=getStack with stateful headers to retrieve the current debugger call stack. Returns raw XML response from the SAP ADT debugger API.
async debuggerGetStack(): Promise<string> { this.ensureDebugSession(); const resp = await this.http.post( "/sap/bc/adt/debugger?method=getStack", "", { headers: this.statefulHeaders({ Accept: "application/xml" }), responseType: "text", } ); return resp.data as string; } - src/mcp-server.ts:726-733 (schema)The input schema for get_debugger_stack defines it accepts only the optional system_id parameter (via SYSTEM_ID_PROP), with no required properties.
name: "get_debugger_stack", description: "Get the current call stack in the debugger", inputSchema: { type: "object" as const, properties: { ...SYSTEM_ID_PROP }, required: [], }, }, - src/mcp-server.ts:725-733 (registration)The tool is registered in the MCP server's ListToolsRequestSchema handler with name 'get_debugger_stack' and description 'Get the current call stack in the debugger'.
{ name: "get_debugger_stack", description: "Get the current call stack in the debugger", inputSchema: { type: "object" as const, properties: { ...SYSTEM_ID_PROP }, required: [], }, }, - src/mcp-server.ts:1233-1236 (handler)The MCP server's CallToolRequestSchema handler dispatches 'get_debugger_stack' to client.debuggerGetStack() and returns the text result.
case "get_debugger_stack": { const result = await client.debuggerGetStack(); return { content: [{ type: "text", text: result }] }; }