Skip to main content
Glama
workbackai

MCP NodeJS Debugger

by workbackai

step_into

Step into function calls during Node.js debugging to inspect code execution and variable states.

Instructions

Steps into function calls

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Implementation Reference

  • The 'step_into' tool handler. It checks if the debugger is enabled (enabling it if not), verifies the debugger is paused, sends the 'Debugger.stepInto' command via the inspector, and returns a success or error message.
    server.tool(
      "step_into",
      "Steps into function calls",
      {},
      async () => {
        try {
          // Ensure debugger is enabled
          if (!inspector.debuggerEnabled) {
            await inspector.enableDebugger();
          }
          
          if (!inspector.paused) {
            return {
              content: [{
                type: "text",
                text: "Debugger is not paused at a breakpoint"
              }]
            };
          }
          
          await inspector.send('Debugger.stepInto', {});
          
          return {
            content: [{
              type: "text",
              text: "Stepped into function call"
            }]
          };
        } catch (err) {
          return {
            content: [{
              type: "text",
              text: `Error stepping into: ${err.message}`
            }]
          };
        }
      }
    );
  • The tool is registered using server.tool() with the name 'step_into'. This is the standard MCP server tool registration pattern.
    server.tool(
      "step_into",
      "Steps into function calls",
      {},
      async () => {
        try {
          // Ensure debugger is enabled
          if (!inspector.debuggerEnabled) {
            await inspector.enableDebugger();
          }
          
          if (!inspector.paused) {
            return {
              content: [{
                type: "text",
                text: "Debugger is not paused at a breakpoint"
              }]
            };
          }
          
          await inspector.send('Debugger.stepInto', {});
          
          return {
            content: [{
              type: "text",
              text: "Stepped into function call"
            }]
          };
        } catch (err) {
          return {
            content: [{
              type: "text",
              text: `Error stepping into: ${err.message}`
            }]
          };
        }
      }
    );
  • The schema is defined inline as an empty object {}, meaning the tool accepts no parameters.
    {},
  • The Inspector.send() helper method handles sending commands (including 'Debugger.stepInto') over the WebSocket to the Node.js debugger, managing pending request queues and timeouts.
    async send(method, params) {
    	return new Promise((resolve, reject) => {
    		const timeout = setTimeout(() => {
    			reject(new Error(`Request timed out: ${method}`));
    			this.pendingRequests.delete(id);
    		}, 5000);
    		
    		const checkConnection = () => {
    			if (this.connected) {
    				try {
    					const id = Math.floor(Math.random() * 1000000);
    					this.pendingRequests.set(id, { 
    						resolve: (result) => {
    							clearTimeout(timeout);
    							resolve(result);
    						}, 
    						reject: (err) => {
    							clearTimeout(timeout);
    							reject(err);
    						} 
    					});
    					
    					this.ws.send(JSON.stringify({
    						id,
    						method,
    						params
    					}));
    				} catch (err) {
    					clearTimeout(timeout);
    					reject(err);
    				}
    			} else {
    				const connectionCheckTimer = setTimeout(checkConnection, 100);
    				// If still not connected after 3 seconds, reject the promise
    				setTimeout(() => {
    					clearTimeout(connectionCheckTimer);
    					clearTimeout(timeout);
    					reject(new Error('Not connected to debugger'));
    				}, 3000);
    			}
    		};
    		
    		checkConnection();
    	});
    }
Behavior1/5

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

With no annotations, the description must convey all behavioral traits, but it only restates the function name. It fails to mention important details such as whether it requires an active debug session, handles async functions, or what happens when stepping into a function that ends.

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 short sentence, which is efficient and not wasteful. However, it is too minimal to be fully informative, slightly reducing the score from a perfect 5.

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 tool's role in debugging, a complete description would include context like prerequisites (must have a running session) and output (returns location or variable state). The current description is insufficient for safe and effective use.

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 no parameters, so schema coverage is 100%. Per guidelines, baseline is 4 since no parameter info is needed from the description.

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 it steps into function calls, providing a specific verb and resource. However, it does not distinguish from sibling tools like step_over or step_out, which are also debugger stepping actions, resulting in a lack of differentiation.

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 on when to use step_into versus alternatives. No context about prerequisites or conditions for use, leaving the agent without decision support.

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/workbackai/mcp-nodejs-debugger'

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