debugger_list_sessions
View active debugging sessions to monitor and manage ongoing program analysis with the GDB debugger.
Instructions
List all active debugging sessions.
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": "debugger_list_sessions"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| result | Yes |
Implementation Reference
- server.py:65-70 (handler)Main MCP tool handler decorated with @mcp.tool() that calls debugger_tools.list_sessions() to list active debugging sessions
@mcp.tool() def debugger_list_sessions() -> str: """List all active debugging sessions.""" if not debugger_tools: return "Error: No debuggers are available on this system" return debugger_tools.list_sessions() - modules/gdb/gdbTools.py:79-83 (handler)GDB-specific implementation that retrieves session list from session manager and formats it as a human-readable string
def list_sessions(self) -> str: sessions = self.sessionManager.list_sessions() if not sessions: return "No active GDB sessions" return "Active GDB sessions:\n" + "\n".join(f"- {sid}" for sid in sessions) - modules/lldb/lldbTools.py:66-70 (handler)LLDB-specific implementation that retrieves session list from session manager and formats it as a human-readable string
def list_sessions(self) -> str: sessions = self.session_manager.list_sessions() if not sessions: return "No active LLDB sessions" return "Active LLDB sessions:\n" + "\n".join(f"- {sid}" for sid in sessions) - modules/base/debuggerBase.py:52-55 (schema)Abstract base class definition that declares the list_sessions() method signature returning a string
@abstractmethod def list_sessions(self) -> str: """List all active debugging sessions.""" pass - modules/gdb/sessionManager.py:52-54 (helper)GDB session manager helper that returns list of active session IDs after cleaning up dead sessions
def list_sessions(self) -> list: self._cleanup_dead_sessions() return list(self.sessions.keys())