Skip to main content
Glama

Set a breakpoint

set_breakpoint

Pause Node.js execution at a chosen file and line, optionally only when a JavaScript condition is truthy, even if the file is not loaded yet. Returns a breakpoint ID for later removal.

Instructions

Set a (optionally conditional) breakpoint at file:line. Line is 1-based. The file may not be loaded yet; the breakpoint resolves when it is. Returns the breakpoint id to use with remove_breakpoint.

Input Schema

NameRequiredDescriptionDefault
fileYesPath to the source file, relative to the session cwd or absolute.
lineYes1-based line number.
conditionNoJS expression; the breakpoint only triggers when it is truthy, e.g. `user.id === 42`.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A4/5.0
Behavior4/5

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

With no annotations, the description carries the full burden and discloses non-obvious behavior: the breakpoint may be set on an unloaded file and resolves lazily, and the tool returns an id for later removal. It does not cover permissions, error cases, or required debug session state, but it adds meaningful context beyond the schema.

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?

Three tight sentences, front-loaded with the core action, followed by important behavioral notes and return information. No wasted words.

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?

For a 3-parameter debugger tool with no output schema and no annotations, the description covers the essential behavior (deferred resolution) and return value, which compensates for the missing output schema. Minor gaps remain around error conditions and debug session prerequisites.

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 description coverage is 100%, so the schema already defines file, line (1-based), and condition. The description adds little parameter-specific meaning beyond restating 'optionally conditional' and 'file:line', so the baseline of 3 is appropriate.

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 states a specific verb ('Set') and resource ('breakpoint at file:line'), making the tool's purpose immediately clear. It also references the complementary remove_breakpoint tool for the returned id, helping distinguish it from sibling breakpoint-management tools.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines3/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

Usage is implied by the purpose and the note that 'The file may not be loaded yet; the breakpoint resolves when it is,' but there is no explicit when-to-use versus alternatives (e.g., set_exception_breakpoints) or exclusions. The return-value workflow with remove_breakpoint is helpful but narrow.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.