Skip to main content
Glama

set_breakpoint

Pauses program execution at a chosen source line, function, or statement during debugging, with optional conditions and logpoints to inspect behavior without stopping.

Instructions

Set a breakpoint. Setting breakpoints on non-executable lines (structural, declarative) may lead to unexpected behavior

Input Schema

NameRequiredDescriptionDefault
fileNoPath to the source file or Java FQCN. For Java, passing a fully-qualified class name (e.g. "com.example.MyClass" or "com.example.Outer$Inner") is preferred — it works reliably with all classloaders including custom classloaders. Alternatively, use absolute file paths.
lineNoLine number where to set breakpoint. Executable statements (assignments, function calls, conditionals, returns) work best. Structural lines (function/class definitions), declarative lines (imports), or non-executable lines (comments, blank lines) may cause unexpected stepping behavior
functionNoAddress by symbol name instead of file location: break on entry to this function/method (DAP function breakpoint). No file or line needed — names survive edits better than both. Composes with condition only. Supported by Python, Go, Rust, C/C++, .NET, Java, JavaScript and COBOL (paragraph, section or PROGRAM-ID names, e.g. "1000-INIT" or "1000-INIT OF PAYROLL") adapters; not by Ruby (rdbg ignores the request) or Dart (the SDK adapters have no function breakpoints). JavaScript names are dotted runtime paths (e.g. "handler" or "obj.method") bound to the current function value: top-level function declarations of the main module bind at launch; functions in modules loaded later bind at the next pause
nearLineNoWith statement only: when the statement text appears on multiple lines, bind to the match closest to this line
conditionNoOptional expression: only break (or log) when it evaluates truthy
sessionIdYes
statementNoAddress by content instead of line number: the text of the target line, like an Edit-tool match — a distinctive substring is enough (leading/trailing whitespace and trailing //- or #-comments are ignored; an exact whole-line match always wins over substring matches). Preferred over line — it can only land on a line containing your text (an inexact or multi-candidate match adds a warning to the response) and survives file edits across restart_debugging. If the text appears on multiple lines, the error lists every match; add nearLine to pick one. Provide statement OR line, not both
logMessageNoCreate a logpoint: instead of pausing, log this message when the line is hit. Expressions in {curly braces} are interpolated (e.g. "order={orderId} total={total}"). Messages arrive in get_output while the program runs at full speed. Supported by the Python, JavaScript, Go, Rust, C/C++, COBOL ({WS-NAME} data references), Dart and mock adapters; not by Java, .NET, or Ruby
suspendPolicyNoSuspend policy when breakpoint is hit: "all" suspends all threads (default), "thread" only suspends the event thread. Only supported by the Java/JDI adapter.
expectedContentNoOptional assertion: text you expect on the target line — a distinctive substring is enough (leading/trailing whitespace and trailing //- or #-comments are ignored). If it does not match, the breakpoint is NOT set and the error shows the actual content of that line and its neighbors — use this to catch stale or off-by-one line numbers before they cause confusing behavior

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed2 schema fields changedv0.26.0
    • changedInput schema / properties / function / description
      Previous value: -"Address by symbol name instead of file location: break on entry to this function/method (DAP function breakpoint). No file or line needed — names survive edits better than both. Composes with condition only. Supported by Python, Go, Rust, C/C++, .NET, Java, JavaScript and COBOL (paragraph, section or PROGRAM-ID names, e.g. \"1000-INIT\" or \"1000-INIT OF PAYROLL\") adapters; not by Ruby (rdbg ignores the request). JavaScript names are dotted runtime paths (e.g. \"handler\" or \"obj.method\") bound to the current function value: top-level function declarations of the main module bind at launch; functions in modules loaded later bind at the next pause"New value: +"Address by symbol name instead of file location: break on entry to this function/method (DAP function breakpoint). No file or line needed — names survive edits better than both. Composes with condition only. Supported by Python, Go, Rust, C/C++, .NET, Java, JavaScript and COBOL (paragraph, section or PROGRAM-ID names, e.g. \"1000-INIT\" or \"1000-INIT OF PAYROLL\") adapters; not by Ruby (rdbg ignores the request) or Dart (the SDK adapters have no function breakpoints). JavaScript names are dotted runtime paths (e.g. \"handler\" or \"obj.method\") bound to the current function value: top-level function declarations of the main module bind at launch; functions in modules loaded later bind at the next pause"
    • changedInput schema / properties / logMessage / description
      Previous value: -"Create a logpoint: instead of pausing, log this message when the line is hit. Expressions in {curly braces} are interpolated (e.g. \"order={orderId} total={total}\"). Messages arrive in get_output while the program runs at full speed. Supported by the Python, JavaScript, Go, Rust, C/C++, COBOL ({WS-NAME} data references) and mock adapters; not by Java, .NET, or Ruby"New value: +"Create a logpoint: instead of pausing, log this message when the line is hit. Expressions in {curly braces} are interpolated (e.g. \"order={orderId} total={total}\"). Messages arrive in get_output while the program runs at full speed. Supported by the Python, JavaScript, Go, Rust, C/C++, COBOL ({WS-NAME} data references), Dart and mock adapters; not by Java, .NET, or Ruby"
  2. Changed7 schema fields changedv0.25.1
    • addedInput schema / properties / condition / description
      Added value: +"Optional expression: only break (or log) when it evaluates truthy"
    • addedInput schema / properties / expectedContent
      Added value: +{
      +  "description": "Optional assertion: text you expect on the target line — a distinctive substring is enough (leading/trailing whitespace and trailing //- or #-comments are ignored). If it does not match, the breakpoint is NOT set and the error shows the actual content of that line and its neighbors — use this to catch stale or off-by-one line numbers before they cause confusing behavior",
      +  "type": "string"
      +}
    • addedInput schema / properties / function
      Added value: +{
      +  "description": "Address by symbol name instead of file location: break on entry to this function/method (DAP function breakpoint). No file or line needed — names survive edits better than both. Composes with condition only. Supported by Python, Go, Rust, C/C++, .NET, Java, JavaScript and COBOL (paragraph, section or PROGRAM-ID names, e.g. \"1000-INIT\" or \"1000-INIT OF PAYROLL\") adapters; not by Ruby (rdbg ignores the request). JavaScript names are dotted runtime paths (e.g. \"handler\" or \"obj.method\") bound to the current function value: top-level function declarations of the main module bind at launch; functions in modules loaded later bind at the next pause",
      +  "type": "string"
      +}
    • addedInput schema / properties / logMessage
      Added value: +{
      +  "description": "Create a logpoint: instead of pausing, log this message when the line is hit. Expressions in {curly braces} are interpolated (e.g. \"order={orderId} total={total}\"). Messages arrive in get_output while the program runs at full speed. Supported by the Python, JavaScript, Go, Rust, C/C++, COBOL ({WS-NAME} data references) and mock adapters; not by Java, .NET, or Ruby",
      +  "type": "string"
      +}
    • addedInput schema / properties / nearLine
      Added value: +{
      +  "description": "With statement only: when the statement text appears on multiple lines, bind to the match closest to this line",
      +  "type": "number"
      +}
    • addedInput schema / properties / statement
      Added value: +{
      +  "description": "Address by content instead of line number: the text of the target line, like an Edit-tool match — a distinctive substring is enough (leading/trailing whitespace and trailing //- or #-comments are ignored; an exact whole-line match always wins over substring matches). Preferred over line — it can only land on a line containing your text (an inexact or multi-candidate match adds a warning to the response) and survives file edits across restart_debugging. If the text appears on multiple lines, the error lists every match; add nearLine to pick one. Provide statement OR line, not both",
      +  "type": "string"
      +}
    • changedInput schema / required
      Previous value: -[
      -  "sessionId",
      -  "file",
      -  "line"
      -]New value: +[
      +  "sessionId"
      +]
  3. Changed2 schema fields changedv0.20.0
    • changedInput schema / properties / file / description
      Previous value: -"Path to the source file. Use absolute paths or paths relative to your current working directory"New value: +"Path to the source file or Java FQCN. For Java, passing a fully-qualified class name (e.g. \"com.example.MyClass\" or \"com.example.Outer$Inner\") is preferred — it works reliably with all classloaders including custom classloaders. Alternatively, use absolute file paths."
    • addedInput schema / properties / suspendPolicy
      Added value: +{
      +  "description": "Suspend policy when breakpoint is hit: \"all\" suspends all threads (default), \"thread\" only suspends the event thread. Only supported by the Java/JDI adapter.",
      +  "enum": [
      +    "all",
      +    "thread"
      +  ],
      +  "type": "string"
      +}
  4. First observed

TDQS

C2.9/5.0
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 disclosure burden, and it does little: one caveat about non-executable lines causing unexpected stepping behavior. That caveat is already essentially duplicated in the `line` parameter's schema description, so it adds no new information beyond structured data. Nothing about permissions, duplicate breakpoints, error behavior, or what a successful call yields.

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?

Two short sentences with the core action front-loaded and the caveat second; there is no filler. The brevity is efficient, though it shades into under-specification rather than being a model of tight structure.

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?

This is a 10-parameter tool with no annotations and no output schema, yet the description says nothing about return values (e.g., a breakpoint id the agent needs for remove_breakpoint), failure modes, or how the four address modes interact. The rich schema compensates somewhat, but the description is far too thin for the tool's complexity.

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 90%, so the parameter meanings are already thoroughly documented in structured data (file vs FQCN, statement match semantics, logpoint interpolation, suspendPolicy adapter support). The description adds no parameter-level meaning beyond restating the non-executable-line caveat. Baseline 3 is appropriate when the schema does the heavy lifting.

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 states a specific verb and resource ("Set a breakpoint"), which unambiguously identifies a debugger breakpoint-creation operation. It does not distinguish this from sibling tools like remove_breakpoint, clear_breakpoints, or list_breakpoints, nor does it hint at the addressing modes (line, statement, function) that define this tool's actual surface.

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 versus alternatives: nothing about choosing between line, statement, or function addressing, when to prefer a logpoint, or how it relates to start_debugging/pause_execution. The only usage-ish content is a warning about non-executable lines, which is a caveat rather than a when-to-use rule.

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