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,
          },
        },
      },
    },
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. It mentions starting a local HTTP server but doesn't cover critical aspects like whether this requires specific permissions, if it's a long-running process, potential side effects (e.g., port conflicts), or error handling. This leaves significant gaps for a tool that initiates a server.

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 two sentences with zero waste, front-loading the core action and efficiently explaining the mechanism. Every word contributes directly to understanding the tool's function.

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 starting a debug server with no annotations and no output schema, the description is incomplete. It lacks details on what happens after starting (e.g., server lifecycle, how logs are received, success/failure indicators), which is crucial for an agent to use this tool effectively.

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

Parameters3/5

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

The input schema has 100% description coverage, with the 'port' parameter well-documented including its default value. The description adds no additional parameter information beyond what the schema provides, so it meets the baseline of 3 for high 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 ('Start a debug session') and the mechanism ('starts a local HTTP server to receive logs from instrumented code'), which distinguishes it from siblings like 'stop_debug_session' or 'read_debug_logs'. However, it doesn't explicitly differentiate from all siblings (e.g., 'add_instrument' also involves debug setup).

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?

No guidance is provided on when to use this tool versus alternatives like 'stop_debug_session' or prerequisites such as needing instrumented code first. The description implies usage for receiving logs but lacks explicit context or exclusions.

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

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