Skip to main content
Glama

start_debug_session

Start a local HTTP server to receive logs from instrumented code for interactive debugging with AI coding assistants.

Instructions

Start a debug session. This starts a local HTTP server to receive logs from instrumented code.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
portNoPort number for the debug server (default: 9876)

Implementation Reference

  • The handler logic for the 'start_debug_session' tool. It parses the input port (default 9876), starts a new debug session using SessionManager, initializes the Instrumenter, and returns a success message with session details.
    case 'start_debug_session': {
      const port = (args?.port as number) || 9876;
      const session = await sessionManager.startSession(port);
      instrumenter = new Instrumenter(port);
    
      return {
        content: [
          {
            type: 'text',
            text: `Debug session started!\n\nSession ID: ${session.id}\nServer: http://localhost:${port}\nLog file: ${session.logFile}\n\nYou can now add instruments to capture variable values.`,
          },
        ],
      };
    }
  • The input schema definition for the 'start_debug_session' tool, specifying an optional 'port' parameter.
    inputSchema: {
      type: 'object',
      properties: {
        port: {
          type: 'number',
          description: 'Port number for the debug server (default: 9876)',
          default: 9876,
        },
      },
    },
  • src/index.ts:34-47 (registration)
    Registration of the 'start_debug_session' tool in the ListToolsRequestHandler, including name, description, and input schema.
    {
      name: 'start_debug_session',
      description: 'Start a debug session. This starts a local HTTP server to receive logs from instrumented code.',
      inputSchema: {
        type: 'object',
        properties: {
          port: {
            type: 'number',
            description: 'Port number for the debug server (default: 9876)',
            default: 9876,
          },
        },
      },
    },

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/iarmankhan/agentic-debugger'

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