Skip to main content
Glama
chrome-dev-mcp

chrome-dev-mcp

set_breakpoint

Idempotent

Set a line or column breakpoint in a web app script, using source paths mapped through source maps or exact Chrome URLs, with optional conditional triggers.

Instructions

Set a breakpoint at a 1-based line (and column) of a file. Name the file with source — a path like "src/App.tsx", or the url of a frame get_debugger_state or get_console_logs reported. Either way the position is mapped through source maps into the code Chrome runs, so that code must already be loaded. url/urlRegex instead take a position in the script exactly as Chrome loads it, so a source-mapped position given to them lands on the wrong line or never binds; use a frame's compiledUrl/compiledLine/compiledColumn. The script need not be loaded yet: an empty resolvedLocations means no loaded script matches yet, and the breakpoint binds when one loads — or never, if the URL is wrong. A source breakpoint is removed once its file changes, so set it again after an edit; the next state or navigation result lists it under droppedBreakpoints. A url/urlRegex breakpoint is kept through edits, so it may then stop on other code, or not at all.

Tool call template

Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {
      "lineNumber": "<lineNumber>"
    },
    "name": "set_breakpoint"
  }
}

Input Schema

NameRequiredDescriptionDefault
urlNoExact URL of the script as Chrome loaded it. Provide this, urlRegex or source; if both url and urlRegex, urlRegex takes precedence.
sourceNoFile to break in, as in your project: a path like "src/App.tsx" — more of it when the name alone matches several loaded files — an absolute path, or a source-mapped url. lineNumber and columnNumber are positions in this file.
urlRegexNoRegex on the URL of the script as Chrome loaded it. Provide this, url or source; if both url and urlRegex, urlRegex takes precedence.
conditionNoJS expression; breakpoint triggers only when truthy
lineNumberYesLine number (1-indexed)
columnNumberNoColumn number, 1-indexed (optional)

Output Schema

NameRequiredDescriptionDefault
noteNo
breakpointIdYes
resolvedLocationsYesWhere Chrome bound it in each loaded script, 1-based; source* give the source-mapped position. May be empty for url/urlRegex if the script is not loaded yet; the breakpoint will bind automatically when Chrome parses the script

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed11 schema fields changedv2.0.0
    • addedInput schema / properties / source
      Added value: +{
      +  "description": "File to break in, as in your project: a path like \"src/App.tsx\" — more of it when the name alone matches several loaded files — an absolute path, or a source-mapped url. lineNumber and columnNumber are positions in this file.",
      +  "type": "string"
      +}
    • changedInput schema / properties / url / description
      Previous value: -"Exact script URL. Provide this or urlRegex; if both, urlRegex takes precedence."New value: +"Exact URL of the script as Chrome loaded it. Provide this, urlRegex or source; if both url and urlRegex, urlRegex takes precedence."
    • changedInput schema / properties / urlRegex / description
      Previous value: -"URL regex pattern. Provide this or url; if both, urlRegex takes precedence."New value: +"Regex on the URL of the script as Chrome loaded it. Provide this, url or source; if both url and urlRegex, urlRegex takes precedence."
    • addedOutput schema / properties / note
      Added value: +{
      +  "type": "string"
      +}
    • changedOutput schema / properties / resolvedLocations / description
      Previous value: -"May be empty if the script is not loaded yet; the breakpoint will bind automatically when Chrome parses the script"New value: +"Where Chrome bound it in each loaded script, 1-based; source* give the source-mapped position. May be empty for url/urlRegex if the script is not loaded yet; the breakpoint will bind automatically when Chrome parses the script"
    • removedOutput schema / properties / resolvedLocations / items / properties / scriptId
      Removed value: -{
      -  "type": "string"
      -}
    • addedOutput schema / properties / resolvedLocations / items / properties / source
      Added value: +{
      +  "type": "string"
      +}
    • addedOutput schema / properties / resolvedLocations / items / properties / sourceColumn
      Added value: +{
      +  "type": "number"
      +}
    • addedOutput schema / properties / resolvedLocations / items / properties / sourceLine
      Added value: +{
      +  "type": "number"
      +}
    • addedOutput schema / properties / resolvedLocations / items / properties / url
      Added value: +{
      +  "type": "string"
      +}
    • changedOutput schema / properties / resolvedLocations / items / required
      Previous value: -[
      -  "scriptId",
      -  "lineNumber"
      -]New value: +[
      +  "url",
      +  "lineNumber",
      +  "columnNumber"
      +]
  2. Changed11 schema fields changedv1.3.0
    • changedInput schema / properties / columnNumber / description
      Previous value: -"Column number (optional)"New value: +"Column number, 1-indexed (optional)"
    • addedInput schema / properties / columnNumber / maximum
      Added value: +9007199254740991
    • addedInput schema / properties / columnNumber / minimum
      Added value: +1
    • changedInput schema / properties / columnNumber / type
      Previous value: -"number"New value: +"integer"
    • addedInput schema / properties / lineNumber / maximum
      Added value: +9007199254740991
    • addedInput schema / properties / lineNumber / minimum
      Added value: +1
    • changedInput schema / properties / lineNumber / type
      Previous value: -"number"New value: +"integer"
    • changedInput schema / properties / url / description
      Previous value: -"Exact script URL, or omit to use urlRegex"New value: +"Exact script URL. Provide this or urlRegex; if both, urlRegex takes precedence."
    • changedInput schema / properties / urlRegex / description
      Previous value: -"URL regex pattern (alternative to exact url)"New value: +"URL regex pattern. Provide this or url; if both, urlRegex takes precedence."
    • changedInput schema / required
      Previous value: -[
      -  "url",
      -  "lineNumber"
      -]New value: +[
      +  "lineNumber"
      +]
    • changedOutput schema / (root)
      Previous value: -nullNew value: +{
      +  "$schema": "http://json-schema.org/draft-07/schema#",
      +  "additionalProperties": false,
      +  "properties": {
      +    "breakpointId": {
      +      "type": "string"
      +    },
      +    "resolvedLocations": {
      +      "description": "May be empty if the script is not loaded yet; the breakpoint will bind automatically when Chrome parses the script",
      +      "items": {
      +        "additionalProperties": false,
      +        "properties": {
      +          "columnNumber": {
      +            "type": "number"
      +          },
      +          "lineNumber": {
      +            "type": "number"
      +          },
      +          "scriptId": {
      +            "type": "string"
      +          }
      +        },
      +        "required": [
      +          "scriptId",
      +          "lineNumber"
      +        ],
      +        "type": "object"
      +      },
      +      "type": "array"
      +    }
      +  },
      +  "required": [
      +    "breakpointId",
      +    "resolvedLocations"
      +  ],
      +  "type": "object"
      +}
  3. First observedv1.1.0

TDQS

A4.8/5.0
Behavior5/5

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

Annotations only supply idempotentHint, so the description carries the behavioral load and does so richly: pending binding when no script matches (`resolvedLocations` empty), binding on later load, and the crucial asymmetry that `source` breakpoints are dropped on file edit (surfaced under `droppedBreakpoints`) while `url`/`urlRegex` ones persist and may then stop on the wrong code.

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?

Front-loaded with the action and coordinate base, then the targeting rules, then lifecycle caveats. Dense but purposeful; the source-map paragraph is long, though nearly every clause prevents a concrete failure mode.

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

Completeness5/5

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

An output schema exists, so return values needn't be spelled out, and the description still explains the two return fields that change agent behavior (`resolvedLocations`, `droppedBreakpoints`). For a 6-parameter tool with subtle source-map semantics, nothing essential is missing.

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?

Schema coverage is 100%, so the baseline is 3, but the description adds real semantics beyond it: how `source` positions are remapped through source maps, why `url`/`urlRegex` positions are not, and the precedence/persistence consequences of choosing each. Conditional-expression behavior and column semantics are left entirely to the schema.

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?

Opens with a specific verb+resource+coordinate system: "Set a breakpoint at a 1-based line (and column) of a file." It is clearly distinguishable from the list_breakpoints/remove_breakpoint siblings, which it never gets confused with.

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

Usage Guidelines5/5

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

Explicitly routes between the three targeting modes: `source` maps through source maps into Chrome code, while `url`/`urlRegex` take positions exactly as Chrome loads them, with a warning that a source-mapped position given to them 'lands on the wrong line or never binds'. It also names the sibling that supplies the right coordinates (a frame's `compiledUrl`/`compiledLine`/`compiledColumn` from get_debugger_state).

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