Skip to main content
Glama
signal-slot

MCP GDB Server

by signal-slot

gdb_list_sessions

List all active GDB debugging sessions on the MCP GDB Server to manage and monitor ongoing debugging processes efficiently.

Instructions

List all active GDB sessions

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Implementation Reference

  • Handler function that lists all active GDB sessions by converting the activeSessions Map to an array of session objects (id, target, workingDir) and returns a formatted text response with JSON stringified sessions.
    private async handleGdbListSessions() {
      const sessions = Array.from(activeSessions.entries()).map(([id, session]) => ({
        id,
        target: session.target || 'No program loaded',
        workingDir: session.workingDir || process.cwd()
      }));
      
      return {
        content: [
          {
            type: 'text',
            text: `Active GDB Sessions (${sessions.length}):\n\n${JSON.stringify(sessions, null, 2)}`
          }
        ]
      };
    }
  • Tool schema definition including name, description, and empty input schema (no parameters required).
    {
      name: 'gdb_list_sessions',
      description: 'List all active GDB sessions',
      inputSchema: {
        type: 'object',
        properties: {}
      }
    },
  • src/index.ts:367-368 (registration)
    Switch case registration in CallToolRequestSchema handler that routes 'gdb_list_sessions' tool calls to the handleGdbListSessions method.
    case 'gdb_list_sessions':
      return await this.handleGdbListSessions();
Behavior2/5

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

With no annotations provided, the description carries the full burden of behavioral disclosure but offers minimal information. It states what the tool does but doesn't describe how it behaves—such as whether it returns structured data, requires authentication, has rate limits, or what 'active' means in this context. This leaves significant gaps for a tool interacting with debugging sessions.

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, clear sentence with no wasted words. It's front-loaded with the core action and resource, making it highly efficient and easy to parse, which is ideal for a simple tool with no parameters.

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

Completeness2/5

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

Given the complexity of GDB session management and the lack of annotations and output schema, the description is insufficient. It doesn't explain what constitutes an 'active' session, the format of the returned list, or how this tool integrates with sibling tools for session lifecycle management, leaving the agent with incomplete contextual understanding.

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 zero parameters, and schema description coverage is 100%, so there's no need for parameter documentation in the description. The description appropriately focuses on the tool's purpose without redundant parameter details, earning a high baseline score for this dimension.

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 tool's purpose with a specific verb ('List') and resource ('all active GDB sessions'), making it immediately understandable. However, it doesn't explicitly differentiate itself from potential sibling tools that might also list sessions or provide session information, which prevents a perfect score.

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. It doesn't mention prerequisites, timing considerations, or how it relates to sibling tools like gdb_attach or gdb_terminate, leaving the agent with no usage context beyond the basic purpose.

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

Related 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/signal-slot/mcp-gdb'

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