get_debugger_session
Check if a debugger session is attached to an SAP system. Returns session information without blocking, using optional terminal, IDE, user, and system identifiers.
Instructions
Check if a debugger session is currently attached. Returns session info without blocking.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| terminal_id | No | Terminal identifier (default: MCP_TERMINAL) | |
| ide_id | No | IDE identifier (default: MCP_IDE) | |
| user | No | SAP username (default: current user) | |
| system_id | No | SAP system ID (e.g. DEV). Omit to use default system. |
Implementation Reference
- src/mcp-server.ts:1268-1272 (handler)Handler for 'get_debugger_session' tool: parses input with DebuggerSessionSchema, calls client.debuggerGetSession(), returns the result.
case "get_debugger_session": { const { terminal_id, ide_id, user } = DebuggerSessionSchema.parse(args); const result = await client.debuggerGetSession(terminal_id, ide_id, user); return { content: [{ type: "text", text: result }] }; } - src/mcp-server.ts:797-810 (registration)Tool registration for 'get_debugger_session' including description and input schema definition.
{ name: "get_debugger_session", description: "Check if a debugger session is currently attached. Returns session info without blocking.", inputSchema: { type: "object" as const, properties: { terminal_id: { type: "string", description: "Terminal identifier (default: MCP_TERMINAL)" }, ide_id: { type: "string", description: "IDE identifier (default: MCP_IDE)" }, user: { type: "string", description: "SAP username (default: current user)" }, ...SYSTEM_ID_PROP, }, required: [], }, }, - src/mcp-server.ts:158-162 (schema)Input schema (DebuggerSessionSchema) for get_debugger_session: terminal_id, ide_id, user (all optional).
const DebuggerSessionSchema = z.object({ terminal_id: z.string().optional(), ide_id: z.string().optional(), user: z.string().optional(), }); - src/adt-client.ts:471-482 (handler)AdtClient.debuggerGetSession() — the actual HTTP implementation: calls GET /sap/bc/adt/debugger/listeners to check session status without blocking.
async debuggerGetSession(terminalId = "MCP_TERMINAL", ideId = "MCP_IDE", user?: string): Promise<string> { this.ensureDebugSession(); const u = encodeURIComponent((user ?? this.config.username).toUpperCase()); const resp = await this.http.get( `/sap/bc/adt/debugger/listeners?debuggingMode=user&terminalId=${encodeURIComponent(terminalId)}&ideId=${encodeURIComponent(ideId)}&requestUser=${u}`, { headers: this.statefulHeaders({ Accept: "application/xml" }), responseType: "text", } ); return resp.data as string; }