Skip to main content
Glama

debugger_list_sessions

View active debugging sessions to monitor and manage ongoing program analysis with the GDB debugger.

Instructions

List all active debugging sessions.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
resultYes

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()
  • 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)
  • 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)
  • 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
  • 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())
Behavior2/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

With no annotations provided, the description carries full burden but only states the basic action without disclosing behavioral traits. It doesn't mention whether this is a read-only operation, what the output format looks like (though an output schema exists), potential rate limits, authentication needs, or how 'active' sessions are defined. The description adds minimal value beyond the tool name.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is a single, efficient sentence that directly states the tool's purpose with zero wasted words. It's appropriately sized for a simple list operation and front-loads the essential information without unnecessary elaboration.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness3/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given the tool's simplicity (0 parameters, output schema exists), the description is minimally adequate but lacks context about sibling tools and behavioral details. The output schema reduces the need to explain return values, but without annotations, the description should ideally clarify the operation's safety and scope relative to similar tools, which it doesn't do.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters4/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

The tool has 0 parameters, and schema description coverage is 100% (though trivial since there are no parameters). The description doesn't need to compensate for any parameter documentation gaps, and it correctly implies no inputs are required. A baseline of 4 is appropriate for zero-parameter tools with complete schema coverage.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states the action ('List') and target ('all active debugging sessions'), providing a specific verb+resource combination. However, it doesn't differentiate from its sibling 'gdb_list_sessions' and 'lldb_list_sessions', which appear to serve similar purposes for different debugger types, leaving some ambiguity about scope.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines2/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description provides no guidance on when to use this tool versus alternatives like 'debugger_status' (which might check a specific session) or the GDB/LLDB-specific list tools. There's no mention of prerequisites, context, or exclusions, leaving usage decisions entirely to the agent's inference.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Install Server

Other Tools

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/smadi0x86/MDB-MCP'

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