Skip to main content
Glama

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();

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