Skip to main content
Glama

list_debug_sessions

View all active debugging sessions to monitor ongoing program analysis and manage debugging workflows efficiently.

Instructions

List all active debugging sessions

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Implementation Reference

  • Handler function for the 'list_debug_sessions' tool. Retrieves all active debug sessions using sessionManager.getAllSessions(), maps them to a serializable format, and returns a JSON response with success status, sessions list, and count.
    private async handleListDebugSessions(): Promise<ServerResult> { try { const sessionsInfo: DebugSessionInfo[] = this.sessionManager.getAllSessions(); const sessionData = sessionsInfo.map((session: DebugSessionInfo) => { const mappedSession: Record<string, unknown> = { id: session.id, name: session.name, language: session.language as DebugLanguage, state: session.state, createdAt: session.createdAt.toISOString(), }; if (session.updatedAt) { mappedSession.updatedAt = session.updatedAt.toISOString(); } return mappedSession; }); return { content: [{ type: 'text', text: JSON.stringify({ success: true, sessions: sessionData, count: sessionData.length }) }] }; } catch (error) { this.logger.error('Failed to list debug sessions', { error }); throw new McpError(McpErrorCode.InternalError, `Failed to list debug sessions: ${(error as Error).message}`); } }
  • Core helper method that returns all DebugSessionInfo objects from the session store. This is the actual implementation delegated to by the tool handler.
    public getAllSessions(): DebugSessionInfo[] { return this.sessionStore.getAll(); }
  • Tool schema definition in the listTools response, specifying name, description, and empty input schema (no arguments required).
    { name: 'list_debug_sessions', description: 'List all active debugging sessions', inputSchema: { type: 'object', properties: {} } },
  • src/server.ts:537-539 (registration)
    Registration of the tool handler in the CallToolRequestSchema switch statement, dispatching to handleListDebugSessions().
    result = await this.handleListDebugSessions(); break; }

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/debugmcpdev/mcp-debugger'

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