Skip to main content
Glama
qckfx

Node.js Debugger MCP Server

by qckfx

step_debug

Step through Node.js code execution during debugging to inspect program flow and identify issues. Use actions like next, step, continue, or out to control execution.

Instructions

Step through code execution

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
actionYesDebug action to perform

Implementation Reference

  • The main handler function for the 'step_debug' tool. It checks for an active debug session, then uses the Chrome DevTools Protocol (CDP) Debugger domain to perform the specified stepping action: stepOver (next), stepInto (step), resume (continue), or stepOut (out). Returns success or error message.
    private async stepDebug(args: { action: "next" | "step" | "continue" | "out" }) {
      if (!this.debugSession.connected || !this.debugSession.client) {
        return {
          content: [
            {
              type: "text",
              text: "No active debug session. Please attach debugger first.",
            },
          ],
          isError: true,
        };
      }
    
      try {
        const { Debugger } = this.debugSession.client;
        
        // Use CDP to perform the step action
        switch (args.action) {
          case "next":
            await Debugger.stepOver();
            break;
          case "step":
            await Debugger.stepInto();
            break;
          case "continue":
            await Debugger.resume();
            break;
          case "out":
            await Debugger.stepOut();
            break;
        }
    
        return {
          content: [
            {
              type: "text",
              text: `Performed debug action: ${args.action}`,
            },
          ],
        };
      } catch (error) {
        return {
          content: [
            {
              type: "text",
              text: `Error performing debug action: ${error}`,
            },
          ],
          isError: true,
        };
      }
  • Input schema definition for the 'step_debug' tool, specifying the 'action' parameter with allowed values.
    inputSchema: {
      type: "object",
      properties: {
        action: { 
          type: "string", 
          enum: ["next", "step", "continue", "out"],
          description: "Debug action to perform"
        }
      },
      required: ["action"],
    },
  • src/index.ts:203-217 (registration)
    Tool registration in ListToolsRequestSchema handler, defining name, description, and input schema for 'step_debug'.
    {
      name: "step_debug",
      description: "Step through code execution",
      inputSchema: {
        type: "object",
        properties: {
          action: { 
            type: "string", 
            enum: ["next", "step", "continue", "out"],
            description: "Debug action to perform"
          }
        },
        required: ["action"],
      },
    },
  • src/index.ts:259-260 (registration)
    Dispatcher case in CallToolRequestSchema handler that routes 'step_debug' calls to the stepDebug method.
    case "step_debug":
      return await this.stepDebug(args as { action: "next" | "step" | "continue" | "out" });
Behavior2/5

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

No annotations are provided, so the description carries the full burden of behavioral disclosure. 'Step through code execution' implies a read-only or controlled execution action, but it doesn't specify effects (e.g., whether it changes program state, requires specific permissions, or has side effects like pausing). For a debugging tool with zero annotation coverage, this leaves significant gaps in understanding its behavior.

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

Conciseness4/5

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

The description is a single, efficient sentence with no wasted words. It's front-loaded and clear, though it could benefit from more detail. The brevity is appropriate but borders on under-specification, as it lacks elaboration on context or usage.

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 debugging tools and the lack of annotations and output schema, the description is incomplete. It doesn't explain what the tool returns, how it interacts with sibling tools (e.g., 'attach_debugger'), or the execution context. For a tool that likely requires a debugger session, this leaves too many unanswered questions.

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 'action' parameter well-documented via enum values ('next', 'step', 'continue', 'out'). The description doesn't add any meaning beyond this, such as explaining differences between actions or their impact. Given the high schema coverage, a baseline score of 3 is appropriate as the schema handles the heavy lifting.

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

Purpose3/5

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

The description 'Step through code execution' clearly indicates the tool's function but is somewhat vague. It specifies the action (stepping through code) but doesn't mention what resource it operates on (e.g., a debugger session, process) or distinguish it from sibling tools like 'pause_execution' or 'set_breakpoint'. The purpose is understandable but lacks specificity.

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 (e.g., needing an attached debugger), exclusions, or how it differs from siblings like 'continue' or 'next' in the action enum. Without such context, usage is implied but not explicitly defined.

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/qckfx/node-debugger-mcp'

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