Skip to main content
Glama
workbackai

MCP NodeJS Debugger

by workbackai

list_breakpoints

Retrieve a list of all currently active breakpoints in the Node.js debug session to track paused execution points and manage debugging workflow.

Instructions

Lists all active breakpoints

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Implementation Reference

  • The handler function for the 'list_breakpoints' tool. It ensures the debugger is enabled, checks if any breakpoints exist in the inspector's breakpoints Map, and returns a JSON-formatted list of active breakpoints.
    // List all breakpoints tool
    server.tool(
      "list_breakpoints",
      "Lists all active breakpoints",
      {},
      async () => {
        try {
          // Ensure debugger is enabled
          if (!inspector.debuggerEnabled) {
            await inspector.enableDebugger();
          }
          
          if (inspector.breakpoints.size === 0) {
            return {
              content: [{
                type: "text",
                text: "No active breakpoints"
              }]
            };
          }
          
          const breakpointsList = Array.from(inspector.breakpoints.values());
          
          return {
            content: [{
              type: "text",
              text: JSON.stringify(breakpointsList, null, 2)
            }]
          };
        } catch (err) {
          return {
            content: [{
              type: "text",
              text: `Error listing breakpoints: ${err.message}`
            }]
          };
        }
      }
    );
  • The tool is registered using server.tool() with name 'list_breakpoints', a description, an empty schema (no parameters), and the async handler function.
    // List all breakpoints tool
    server.tool(
      "list_breakpoints",
      "Lists all active breakpoints",
      {},
      async () => {
        try {
          // Ensure debugger is enabled
          if (!inspector.debuggerEnabled) {
            await inspector.enableDebugger();
          }
          
          if (inspector.breakpoints.size === 0) {
            return {
              content: [{
                type: "text",
                text: "No active breakpoints"
              }]
            };
          }
          
          const breakpointsList = Array.from(inspector.breakpoints.values());
          
          return {
            content: [{
              type: "text",
              text: JSON.stringify(breakpointsList, null, 2)
            }]
          };
        } catch (err) {
          return {
            content: [{
              type: "text",
              text: `Error listing breakpoints: ${err.message}`
            }]
          };
        }
      }
    );
  • The input schema for 'list_breakpoints' is an empty object {} — the tool accepts no parameters.
    {},
  • The breakpoints data store: this.breakpoints = new Map() on the Inspector class, which stores breakpoints set via the debugger and is read by list_breakpoints.
    this.breakpoints = new Map();
    this.paused = false;
Behavior2/5

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

With no annotations, the description must disclose behavioral traits. It only states that it lists active breakpoints, but does not mention whether it is read-only, whether a debug session is required, or any side effects. This leaves key behavioral aspects undocumented.

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 a single, well-constructed sentence that directly conveys the tool's purpose without extraneous words. It earns its place with no fluff.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness4/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given the simplicity (no parameters, no output schema), the description is largely complete. However, it could benefit from mentioning the return format or that it reflects the current debug session state. Still, for a straightforward list operation, it is adequate.

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?

There are no parameters, so the schema already covers everything. The description adds no additional meaning, but none is needed. Baseline of 4 applies due to zero parameters.

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

Purpose5/5

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

The description explicitly states the action ('lists') and the resource ('all active breakpoints'), leaving no ambiguity about its function. It clearly distinguishes from sibling tools like set_breakpoint or step_into, which perform different operations.

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, such as when to list breakpoints after setting them. The description lacks context about prerequisites or appropriate scenarios, leaving the agent to infer usage.

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