Skip to main content
Glama

list_breakpoints

List all breakpoints in a debugging session, showing their file locations and conditions, to review and manage debugging points.

Instructions

Lists all breakpoints set in a debugging session, including their locations and conditions.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
session_idYesID of the debugging session.

Implementation Reference

  • The handler that executes the list_breakpoints tool logic. It parses the session_id input, calls sessionManager.listBreakpoints(), and returns the breakpoints formatted as JSON.
    case 'list_breakpoints': {
      const params = z.object({session_id: z.string()}).parse(args);
    
      const breakpoints = sessionManager.listBreakpoints(params.session_id);
    
      return {
        content: [
          {
            type: 'text',
            text: JSON.stringify(
              {
                breakpoints: breakpoints.map((bp) => ({
                  id: bp.id,
                  url: bp.url,
                  line_number: bp.lineNumber,
                  column_number: bp.columnNumber,
                  condition: bp.condition,
                  enabled: bp.enabled,
                })),
              },
              null,
              2
            ),
          },
        ],
      };
    }
  • The BreakpointInfo interface type definition used as the return type for list_breakpoints.
    export interface BreakpointInfo {
      id: string;
      url: string;
      lineNumber: number;
      columnNumber?: number;
      condition?: string;
      enabled: boolean;
      resolvedLocations: Array<{
        scriptId: string;
        lineNumber: number;
        columnNumber: number;
      }>;
    }
  • src/server.ts:161-174 (registration)
    Registration of the list_breakpoints tool with its name, description, and input schema requiring session_id.
      name: 'list_breakpoints',
      description:
        'Lists all breakpoints set in a debugging session, including their locations and conditions.',
      inputSchema: {
        type: 'object',
        properties: {
          session_id: {
            type: 'string',
            description: 'ID of the debugging session.',
          },
        },
        required: ['session_id'],
      },
    },
  • The listBreakpoints helper method on SessionManager that retrieves all breakpoints from the session's breakpoints map.
    /**
     * Lists all breakpoints in a session.
     *
     * @param sessionId - The session ID
     */
    listBreakpoints(sessionId: string): BreakpointInfo[] {
      const session = this.getSession(sessionId);
      return Array.from(session.breakpoints.values());
    }
Behavior3/5

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

No annotations provided, so description must cover behavioral traits. It states the tool lists breakpoints, which is a read-only operation, but does not disclose return behavior (e.g., empty list handling) or any side effects. Minimal but not misleading.

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?

Single sentence, front-loaded with key action and resource. No unnecessary words.

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

Completeness3/5

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

Given no output schema, description mentions output includes locations and conditions, which is informative. However, it lacks details on return format or possible edge cases. Adequate for a simple list tool but not comprehensive.

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?

Schema already describes session_id parameter with 100% coverage. Description does not add extra meaning beyond the schema, so baseline 3 applies.

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?

Description clearly states verb 'lists' and resource 'breakpoints in a debugging session', and includes details about locations and conditions. This distinguishes it from siblings like set_breakpoint and remove_breakpoint.

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 this tool versus alternatives. Does not mention when not to use or provide context about prerequisites or limitations.

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/johngrimes/mcp-js-debugger'

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