文件历史

提交图

477 次代码提交

作者 SHA1 备注 提交日期
Natallia Harshunova 0d8b92e2a0 Document allowlist/blocklist service worker limitation 2026-06-19 07:54:20 +00:00
Dominik Inführ 08c234ea4b feat: Add get_heapsnapshot_dominators MCP tool (#2215)
Adding the get_heapsnapshot_dominators MCP tool to show the dominators
for a given node. In combination with get_heapsnapshot_retaining_paths
this should help understand what keeps an object reachable and thus
alive.

Co-authored-by: Dominik Inführ <dinfuehr@chromium.org>
Co-authored-by: Nicholas Roscino <nroscino@google.com>
2026-06-16 12:07:41 +00:00
bassem chagra 9e32002a69 fix: return error message when screencast_stop is called with no active recording (#2209)
## Summary

`screencast_stop` returns an empty response when no recording is active,
making it impossible for the calling agent to distinguish "stopped
successfully" from "nothing was recording."

`screencast_start` already handles its inverse case with an explicit
error (`"a screencast recording is already in progress"`), so this makes
`stop` consistent.

## Change

Added an error message when `screencast_stop` is called without an
active recording:

```ts
if (!data) {
  response.appendResponseLine(
    'Error: no active screencast recording to stop.',
  );
  return;
}
```

## Before

Empty tool response — agent cannot tell what happened.

## After

`Error: no active screencast recording to stop.`

---------

Co-authored-by: Nicholas Roscino <nroscino@google.com>
2026-06-16 12:01:11 +00:00
Wolfgang Beyer ed02047ae9 fix: Reset toolGroups before gathering toolGroups (#2200)
`getToolGroups` can be called multiple times. We want to reset the
`window.__dtmcp.toolGroups` array each time to prevent duplications.
2026-06-12 11:47:43 +00:00
Dominik Inführ 4f8eb7ad6b feat: Add the get_heapsnapshot_edges MCP tool (#2180)
This PR adds the get_heapsnapshot_edges MCP tool. Agents can use it to
look at the outgoing edges for a specifc object.

Co-authored-by: Dominik Inführ <dinfuehr@chromium.org>
2026-06-09 19:58:43 +00:00
Dominik Inführ 6bd8c91678 feat: Use HeapSnapshotProxy.nodeIndexById (#2193)
Co-authored-by: Dominik Inführ <dinfuehr@chromium.org>
2026-06-09 17:14:59 +00:00
Serhii Zghama b646feb4f3 feat: include page title in list_pages output (#2166)
## Motivation

`list_pages` shows each page's URL but not its title, which is painful
when multiple pages share a host — e.g. several tabs under
`app.example.com/u/0/`, `/u/1/`, `/u/2/`. There's no way to tell which
is which without visiting each one, even though every page has a usable
`document.title`.

Fixes #2156.
Closes #2175

## What this changes

- `list_pages` text output now shows the title before the URL when
available: `1: My Page (https://example.com) [selected]`. If the page
has no title (e.g. `about:blank`), the format is unchanged.
- The structured content entry for each page now includes a `title`
field alongside `id`, `url`, and `selected`.
- `page.title()` is awaited with a `.catch(() => '')` so a closed or
erroring page silently falls back to the URL-only format.
- `format()` is made `async` to support the `await` inside the page
loop; `createStructuredPage()` likewise becomes `async`.

## Testing

Start the MCP server with multiple tabs open. Call `list_pages` — pages
with titles now display as `id: Title (url)`. Pages without titles
(`about:blank`, data URLs) display as before.

---------

Co-authored-by: Piotr Paulski <31672205+zyzyzyryxy@users.noreply.github.com>
2026-06-09 16:04:12 +00:00
Nikolay Vitkov 834b259eb2 chore: expose loadResouce HostBinding (#2194)
This makes sure that if any resource that is loaded via the HostBinding
will be correctly checked agains the roots object.
2026-06-09 15:11:39 +00:00
Dominik Inführ a97c642d43 feat: Add retaining paths MCP tool (#2187)
This PR adds the `get_heapsnapshot_retaining_paths` MCP tool. This can
be used to find the paths from the target object to the GC roots which
keep that object alive.

Co-authored-by: Dominik Inführ <dinfuehr@chromium.org>
2026-06-09 12:53:30 +00:00
Nikolay Vitkov bede4fbdfa chore: install HostBindingAdapter (#2186)
This PR introduces the HostBindingAdapter to utilize the functions
usually available to DevTools.
Additionally I moved all the DevTools related files under a `devtools`
directory to better separate the extractor logic.
The patch scripts for DevTools were moved under a function to remove the
side-effect nature of the file.
Now gets called in a the creation of the McpContext (and a before hook
in test.)
2026-06-09 12:18:25 +00:00
browser-automation-bot 702d3734f2 chore(main): release chrome-devtools-mcp 1.2.0 (#2153)
publish-on-tag / publish-to-npm (push) Has been cancelled
publish-on-tag / publish-to-mcp-registry (push) Has been cancelled
🤖 I have created a release *beep* *boop*
---


##
[1.2.0](https://github.com/ChromeDevTools/chrome-devtools-mcp/compare/chrome-devtools-mcp-v1.1.1...chrome-devtools-mcp-v1.2.0)
(2026-06-08)


### 🎉 Features

* add experimental TOON support for structured content output
([#2042](https://github.com/ChromeDevTools/chrome-devtools-mcp/issues/2042))
([aa33bff](https://github.com/ChromeDevTools/chrome-devtools-mcp/commit/aa33bff19fcbf87949eec152c4b49d74e0a9330d))
* Adds close_heapsnapshot MCP tool
([#2174](https://github.com/ChromeDevTools/chrome-devtools-mcp/issues/2174))
([8713b93](https://github.com/ChromeDevTools/chrome-devtools-mcp/commit/8713b93b41ce301acf0ebc555c9a1b25d29bc526))
* Handle multiple providers of third-party developer tools
([#2168](https://github.com/ChromeDevTools/chrome-devtools-mcp/issues/2168))
([30d59a7](https://github.com/ChromeDevTools/chrome-devtools-mcp/commit/30d59a78727c31ec9d70d2bd6d9310e78f1888b3))
* implement extension service worker logs
([#1915](https://github.com/ChromeDevTools/chrome-devtools-mcp/issues/1915))
([29e3898](https://github.com/ChromeDevTools/chrome-devtools-mcp/commit/29e389848fd0cae1116620d44fbce508b4404137))
* memory debugging tools
([#2169](https://github.com/ChromeDevTools/chrome-devtools-mcp/issues/2169))
([0217397](https://github.com/ChromeDevTools/chrome-devtools-mcp/commit/02173972574241049885171c5a6fc0ba998a20cc))
* support allowedUrlPattern & blockedUrlPattern Options
([#2037](https://github.com/ChromeDevTools/chrome-devtools-mcp/issues/2037))
([02b4492](https://github.com/ChromeDevTools/chrome-devtools-mcp/commit/02b4492ca605755f67f016ee1de98aa1f506168c))


### 🛠️ Fixes

* Cursor plugin homepage setting field
([#2173](https://github.com/ChromeDevTools/chrome-devtools-mcp/issues/2173))
([8971890](https://github.com/ChromeDevTools/chrome-devtools-mcp/commit/89718901174be7c0c58a1a2b29281ab2f053cd53))


### 📄 Documentation

* **skill:** guide agent to prompt for --categoryExtensions
([#2189](https://github.com/ChromeDevTools/chrome-devtools-mcp/issues/2189))
([8b458f7](https://github.com/ChromeDevTools/chrome-devtools-mcp/commit/8b458f7ad194b52305b831d5bfd6c0b6f5a53376))


###  Performance

* lighthouse file saves to run concurrently
([#2178](https://github.com/ChromeDevTools/chrome-devtools-mcp/issues/2178))
([f90f863](https://github.com/ChromeDevTools/chrome-devtools-mcp/commit/f90f863d4b9d643ab880c9dc8cdd78b6c88ae38d))


### 🏗️ Refactor

* change type of logger
([#2165](https://github.com/ChromeDevTools/chrome-devtools-mcp/issues/2165))
([bf0574d](https://github.com/ChromeDevTools/chrome-devtools-mcp/commit/bf0574da8ce0986beb5dd2f026a2332a7e63b791))
* use validate files on the tool level
([#2152](https://github.com/ChromeDevTools/chrome-devtools-mcp/issues/2152))
([2e039c0](https://github.com/ChromeDevTools/chrome-devtools-mcp/commit/2e039c09e1a273581d9b51081a0feb8a57791947)),
closes
[#2150](https://github.com/ChromeDevTools/chrome-devtools-mcp/issues/2150)

---
This PR was generated with [Release
Please](https://github.com/googleapis/release-please). See
[documentation](https://github.com/googleapis/release-please#release-please).
2026-06-08 16:50:13 +00:00
Piotr Paulski aa33bff19f feat: add experimental TOON support for structured content output (#2042)
Adds `--experimentalToonFormat` boolean flag, controlling how structured
content is formatted in text response.
By default, custom shorthand format is used. With this flag, TOON format
(see https://github.com/toon-format/toon) is used instead.

TOON format is supposed to be more token-efficient and less error-prone
for agents to understand than json, but it's not clear if it will be
better on those metrics than the custom format used so far. (Evals
pending)

One clear benefit over custom format would be less code to maintain if
we decide to fully switch to TOON, due to dropping custom formatters and
reusing json formatters used for structuredContent anyways.

Co-authored-by: Piotr Paulski <piotrpaulski@chromium.org>
2026-06-08 13:41:58 +00:00
Nicholas Roscino 29e389848f feat: implement extension service worker logs (#1915)
This PR introduces the possiblity to collect console messages from
service workers.
2026-06-08 12:30:37 +00:00
Natasha Gorshunova 02b4492ca6 feat: support allowedUrlPattern & blockedUrlPattern Options (#2037)
## Support for Network Blocklists and Allowlists
(`--blocked-url-pattern` & `--allowed-url-pattern` arguments)

This PR adds support for CLI options to restrict network access in the
browser session via URL patterns.

### Key Features & How It Works

- **Pattern Matching:** Utilizes the [URLPattern
Standard](https://urlpattern.spec.whatwg.org/) for pattern matching.
- **Target Detachment:** Silently detaches from targets (pages/tabs)
whose URLs match blocked patterns (or do not match allowed patterns)
upon connection.
- **Runtime Blocking:** Prevents navigations and blocks runtime requests
(such as fetch/XHR and subresources) if they violate the pattern rules.
- **Mutual Exclusivity:** `--blocked-url-pattern` and
`--allowed-url-pattern` conflict with each other and cannot be
configured simultaneously.
- **Browser Requirements:**
  - **`--allowed-url-pattern`**: Requires **Chrome 149+**.
- **`--blocked-url-pattern`**: Works on Chrome versions older than 149,
but **Chrome 149+ is highly recommended**.

### Important Limitations & Side Effects

- **Network Emulation/Throttling Conflict:** Network throttling is
disabled when a network blocklist/allowlist is configured, to avoid
conflicting with Puppeteer's underlying blocking mechanisms.
- Using the `emulate` tool to modify `networkConditions` (e.g. setting
to `Offline`) will throw an error: *`Network throttling is not supported
when network blocking (allowlist/blocklist) is configured.`*
- Other emulation settings (e.g., `cpuThrottlingRate`, `geolocation`,
`viewport`) are unaffected and remain fully functional.

---

### Configuration Examples

#### 1. Blocking specific domains or endpoints (Blocklist)
Add the `--blocked-url-pattern` options to the `args` list in your MCP
settings file:

```json
{
  "mcpServers": {
    "chrome-devtools": {
      "command": "npx",
      "args": [
        "chrome-devtools-mcp@latest",
        "--blocked-url-pattern=*://*.blocked-example.com/*",
        "--blocked-url-pattern=*://*.another-blocked-example.com/*"
      ]
    }
  }
}
```

#### 2. Restricting access to authorized domains (Allowlist)
Add the `--allowed-url-pattern` options to restrict the browser to
permitted hosts (requires Chrome 149+):

```json
{
  "mcpServers": {
    "chrome-devtools": {
      "command": "npx",
      "args": [
        "chrome-devtools-mcp@latest",
        "--allowed-url-pattern=https://*.allowed-example.com/*",
        "--allowed-url-pattern=https://*.another-allowed-example.com/*"
      ]
    }
  }
}
```

---------

Co-authored-by: Natallia Harshunova <nharshunova@chromium.org>
Co-authored-by: Alex Rudenko <alexrudenko@chromium.org>
2026-06-08 09:20:00 +00:00
Nikolay Vitkov f90f863d4b perf: lighthouse file saves to run concurrently (#2178)
💡 **What:** The optimization implemented is refactoring the sequential
file save loops for Lighthouse audits in `src/tools/lighthouse.ts` to
utilize concurrent execution via `Promise.allSettled`.

🎯 **Why:** Previously, the tool saved generated lighthouse reports
linearly (e.g. `html` then `json`), causing unnecessary synchronous
blocking on I/O operations (`fs.writeFile` under the hood via
`context.saveFile`).

📊 **Measured Improvement:** In a benchmark designed to simulate I/O
constraint simulating a 250ms delay for each file write
(`tests/performance/lighthouse_save.bench.ts`), the optimization reduced
file save time from 2749.58ms to 2460.11ms, showing the I/O times were
successfully overlapped and providing a ~250ms gain.

---
*PR created automatically by Jules for task
[9309630185581322418](https://jules.google.com/task/9309630185581322418)
started by @Lightning00Blade*

---------

Co-authored-by: google-labs-jules[bot] <161369871+google-labs-jules[bot]@users.noreply.github.com>
2026-06-05 13:21:06 +00:00
Nikolay Vitkov 0217397257 feat: memory debugging tools (#2169)
Updates the flag for the memory tooling to remove the experimental bit
(keep alias for backwards compatibility).
And updates the SKILLs to reflected the update names and point to the
available tools.

Q: Should it be called `take_heapsnapshot` or `take_heap_snapshot`?
2026-06-05 13:17:53 +00:00
Dominik Inführ 8713b93b41 feat: Adds close_heapsnapshot MCP tool (#2174)
This commit adds the close_heapsnapshot MCP tool such that the coding
agent can close heap snapshots again.

Co-authored-by: Dominik Inführ <dinfuehr@chromium.org>
Co-authored-by: Nicholas Roscino <nroscino@google.com>
2026-06-05 12:56:34 +00:00
Wolfgang Beyer 30d59a7872 feat: Handle multiple providers of third-party developer tools (#2168)
This allows a page to have multiple providers of third-party developer
tools, which each respond to the `devtoolstooldiscovery` event.

- Multiple `ToolGroup`s
- MCP tool responses only mention third-party developer tools, if there
are any. Otherwise this part of the output is skipped.
2026-06-02 15:07:32 +00:00
Nikolay Vitkov bf0574da8c refactor: change type of logger (#2165)
This change aligns most of our logger allowing them to be omitted when
needed meaning code inside the args will not be executed unconditionally
- example `logger?.(JSON.stringy(X))`.

Currently only changes the type, while in a follow up I will remove the
`debug` package and update the file logs.
2026-06-02 09:29:48 +00:00
Nikolay Vitkov 2e039c09e1 refactor: use validate files on the tool level (#2152)
Fixes https://github.com/ChromeDevTools/chrome-devtools-mcp/issues/2138
Closes #2150
2026-05-28 17:13:02 +00:00
Nicholas Roscino b39131172b chore: reflect emulated device in CrUX data (#2131)
CrUX data returned with the performance tool now reflects the emulated
device

Closes: #1813
2026-05-27 14:49:41 +00:00
dependabot[bot] 7b5ec3a1b8 chore(deps-dev): bump chrome-devtools-frontend from 1.0.1632065 to 1.0.1635648 in the bundled-devtools group (#2129)
Bumps the bundled-devtools group with 1 update:
[chrome-devtools-frontend](https://github.com/ChromeDevTools/devtools-frontend).

Updates `chrome-devtools-frontend` from 1.0.1632065 to 1.0.1635648
<details>
<summary>Commits</summary>
<ul>
<li><a
href="https://github.com/ChromeDevTools/devtools-frontend/commit/baad1f9760c7168078a7734315493801271aa34e"><code>baad1f9</code></a>
Roll browser-protocol and CfT</li>
<li><a
href="https://github.com/ChromeDevTools/devtools-frontend/commit/44d52116dc42f14036103e26f04e4a0e3fa443b4"><code>44d5211</code></a>
Network: ensure too large images are linked</li>
<li><a
href="https://github.com/ChromeDevTools/devtools-frontend/commit/b8fec712b8d2c9bbaee7672dfda2d89170ea7c2b"><code>b8fec71</code></a>
Update DevTools DEPS (trusted)</li>
<li><a
href="https://github.com/ChromeDevTools/devtools-frontend/commit/7de281862ab9b80aa6fa27c00e939b79a3022b62"><code>7de2818</code></a>
Roll browser-protocol and CfT</li>
<li><a
href="https://github.com/ChromeDevTools/devtools-frontend/commit/1adef13b6f26cc7be5e3f771c1b66339c3fad03f"><code>1adef13</code></a>
Update DevTools DEPS (trusted)</li>
<li><a
href="https://github.com/ChromeDevTools/devtools-frontend/commit/839f6d242ac83a8c265ebaaf48e8e0c6f92d5925"><code>839f6d2</code></a>
Update DevTools DEPS (trusted)</li>
<li><a
href="https://github.com/ChromeDevTools/devtools-frontend/commit/8bbc3ffedbe713e5dba10f48552413f4af1ea624"><code>8bbc3ff</code></a>
Update DevTools DEPS (trusted)</li>
<li><a
href="https://github.com/ChromeDevTools/devtools-frontend/commit/f4d0583fc171242e6e5c1e408e1d18da7a2c413d"><code>f4d0583</code></a>
Add Plus Button (2/3): declarative plus-button option for
TabbedLocation</li>
<li><a
href="https://github.com/ChromeDevTools/devtools-frontend/commit/f8fbed4db685c65f13af56dcad96531b44b9a4b7"><code>f8fbed4</code></a>
AI: Fix cross-origin data leak in AccessibilityAgent</li>
<li><a
href="https://github.com/ChromeDevTools/devtools-frontend/commit/9be84a9904de7d976f4713aafc28cd1edc9ad465"><code>9be84a9</code></a>
Updated performance formatters to support an optional deviceScope,</li>
<li>Additional commits viewable in <a
href="https://github.com/ChromeDevTools/devtools-frontend/compare/v1.0.1632065...v1.0.1635648">compare
view</a></li>
</ul>
</details>
<br />


[![Dependabot compatibility
score](https://dependabot-badges.githubapp.com/badges/compatibility_score?dependency-name=chrome-devtools-frontend&package-manager=npm_and_yarn&previous-version=1.0.1632065&new-version=1.0.1635648)](https://docs.github.com/en/github/managing-security-vulnerabilities/about-dependabot-security-updates#about-compatibility-scores)

Dependabot will resolve any conflicts with this PR as long as you don't
alter it yourself. You can also trigger a rebase manually by commenting
`@dependabot rebase`.

[//]: # (dependabot-automerge-start)
[//]: # (dependabot-automerge-end)

---

<details>
<summary>Dependabot commands and options</summary>
<br />

You can trigger Dependabot actions by commenting on this PR:
- `@dependabot rebase` will rebase this PR
- `@dependabot recreate` will recreate this PR, overwriting any edits
that have been made to it
- `@dependabot show <dependency name> ignore conditions` will show all
of the ignore conditions of the specified dependency
- `@dependabot ignore <dependency name> major version` will close this
group update PR and stop Dependabot creating any more for the specific
dependency's major version (unless you unignore this specific
dependency's major version or upgrade to it yourself)
- `@dependabot ignore <dependency name> minor version` will close this
group update PR and stop Dependabot creating any more for the specific
dependency's minor version (unless you unignore this specific
dependency's minor version or upgrade to it yourself)
- `@dependabot ignore <dependency name>` will close this group update PR
and stop Dependabot creating any more for the specific dependency
(unless you unignore this specific dependency or upgrade to it yourself)
- `@dependabot unignore <dependency name>` will remove all of the ignore
conditions of the specified dependency
- `@dependabot unignore <dependency name> <ignore condition>` will
remove the ignore condition of the specified dependency and ignore
conditions


</details>

---------

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Nicholas Roscino <nroscino@google.com>
2026-05-27 14:22:09 +00:00
browser-automation-bot 3ba70d350a chore(main): release chrome-devtools-mcp 1.1.1 (#2148)
publish-on-tag / publish-to-npm (push) Has been cancelled
publish-on-tag / publish-to-mcp-registry (push) Has been cancelled
🤖 I have created a release *beep* *boop*
---


##
[1.1.1](https://github.com/ChromeDevTools/chrome-devtools-mcp/compare/chrome-devtools-mcp-v1.1.0...chrome-devtools-mcp-v1.1.1)
(2026-05-27)


### 🛠️ Fixes

* **cli:** have pageId as first argument
([#2142](https://github.com/ChromeDevTools/chrome-devtools-mcp/issues/2142))
([60be3e6](https://github.com/ChromeDevTools/chrome-devtools-mcp/commit/60be3e6bc157bd1121ea1d4b6ad59e37a73cac3e))

---
This PR was generated with [Release
Please](https://github.com/googleapis/release-please). See
[documentation](https://github.com/googleapis/release-please#release-please).
2026-05-27 11:43:21 +00:00
Samiya Caur 60be3e6bc1 fix(cli): have pageId as first argument (#2142)
Refs #1777 

This change makes pageId as the first argument for CLI if
experimentalPageIdRouting flag is enabled

Co-authored-by: Samiya Caur <samiyac@chromium.org>
2026-05-27 07:23:41 +00:00
browser-automation-bot 0089ebdd37 chore(main): release chrome-devtools-mcp 1.1.0 (#2086)
publish-on-tag / publish-to-npm (push) Has been cancelled
publish-on-tag / publish-to-mcp-registry (push) Has been cancelled
🤖 I have created a release *beep* *boop*
---


##
[1.1.0](https://github.com/ChromeDevTools/chrome-devtools-mcp/compare/chrome-devtools-mcp-v1.0.1...chrome-devtools-mcp-v1.1.0)
(2026-05-26)


### 🎉 Features

* add extraHttpHeaders emulation to emulate tool
([#1176](https://github.com/ChromeDevTools/chrome-devtools-mcp/issues/1176))
([6992106](https://github.com/ChromeDevTools/chrome-devtools-mcp/commit/6992106d1ca3bcd9390165035e7b0a3acb7e7317))
* created cursor plugin.json setting file with release auto versioning
([#2091](https://github.com/ChromeDevTools/chrome-devtools-mcp/issues/2091))
([10c8205](https://github.com/ChromeDevTools/chrome-devtools-mcp/commit/10c82055d82eda9e7f229f8ddf3b8770a8732aa7))


### 🛠️ Fixes

* Apply CPU throttling to secondary CDP session
([#2092](https://github.com/ChromeDevTools/chrome-devtools-mcp/issues/2092))
([3ade962](https://github.com/ChromeDevTools/chrome-devtools-mcp/commit/3ade962a8da6b100800304146dc3e50e6419a6ee))
* **cli:** address pid file creation issues
([#2124](https://github.com/ChromeDevTools/chrome-devtools-mcp/issues/2124))
([1b51a52](https://github.com/ChromeDevTools/chrome-devtools-mcp/commit/1b51a520f248d809ab4383cd357cae13280735d4))
* exit on stdin EOF and SIGTERM/SIGINT/SIGHUP, closing the browser
cleanly
([#2117](https://github.com/ChromeDevTools/chrome-devtools-mcp/issues/2117))
([43b934c](https://github.com/ChromeDevTools/chrome-devtools-mcp/commit/43b934cd98d5d585fcde38e24d5d7b3eeb133498))
* Fix throttling info in performance trace output
([#2096](https://github.com/ChromeDevTools/chrome-devtools-mcp/issues/2096))
([57f32b0](https://github.com/ChromeDevTools/chrome-devtools-mcp/commit/57f32b0cd4afe1775b96ba35c27f25d6f0770331))
* make pageId required
([#2084](https://github.com/ChromeDevTools/chrome-devtools-mcp/issues/2084))
([d751693](https://github.com/ChromeDevTools/chrome-devtools-mcp/commit/d751693d887fae4ef7a1e7204545192322cf7820)),
closes
[#2052](https://github.com/ChromeDevTools/chrome-devtools-mcp/issues/2052)
* remove duplicate .mcp.json
([#2095](https://github.com/ChromeDevTools/chrome-devtools-mcp/issues/2095))
([dbf6ba9](https://github.com/ChromeDevTools/chrome-devtools-mcp/commit/dbf6ba93746c4975fc1ed385a8bf0f6395a9a79e))
* Set viewport after updating timeouts when setting emulation
([#2134](https://github.com/ChromeDevTools/chrome-devtools-mcp/issues/2134))
([0c3ac37](https://github.com/ChromeDevTools/chrome-devtools-mcp/commit/0c3ac378a91fa0463ce2302fd963e7946c9f2771))
* use pinned version for plugins
([#2135](https://github.com/ChromeDevTools/chrome-devtools-mcp/issues/2135))
([8ea5f09](https://github.com/ChromeDevTools/chrome-devtools-mcp/commit/8ea5f098ef7e8d8ae4f4bbaea5291cef84b8f15f))
* use realpath for MCP roots validation
([#2127](https://github.com/ChromeDevTools/chrome-devtools-mcp/issues/2127))
([176eb69](https://github.com/ChromeDevTools/chrome-devtools-mcp/commit/176eb695137d9c46a61e2d4d5571880c5145cf46))


### 📄 Documentation

* align coding agent examples with Antigravity
([#2094](https://github.com/ChromeDevTools/chrome-devtools-mcp/issues/2094))
([ce31594](https://github.com/ChromeDevTools/chrome-devtools-mcp/commit/ce31594d6c9614c63a93cd7abddf4522a4c4a053))
* fix installation instructions for VS Code
([#2087](https://github.com/ChromeDevTools/chrome-devtools-mcp/issues/2087))
([9f47df3](https://github.com/ChromeDevTools/chrome-devtools-mcp/commit/9f47df36847cd69b99873709e7ed3936347b648e))


### 🏗️ Refactor

* remove redundant validatePath calls
([#2136](https://github.com/ChromeDevTools/chrome-devtools-mcp/issues/2136))
([521c388](https://github.com/ChromeDevTools/chrome-devtools-mcp/commit/521c388624d448c8c55ee3b5415971ebc35b1ec3))

---
This PR was generated with [Release
Please](https://github.com/googleapis/release-please). See
[documentation](https://github.com/googleapis/release-please#release-please).
2026-05-26 15:29:54 +00:00
Wolfgang Beyer 0c3ac378a9 fix: Set viewport after updating timeouts when setting emulation (#2134)
Tentatively addresses #2115
2026-05-26 13:59:33 +00:00
Alex Rudenko 521c388624 refactor: remove redundant validatePath calls (#2136)
We should primarily validate in the tool calls before we start invoking
tool handlers.
2026-05-26 13:38:59 +00:00
Diego Ballesteros Villamizar 43b934cd98 fix: exit on stdin EOF and SIGTERM/SIGINT/SIGHUP, closing the browser cleanly (#2117)
Fixes #2116.

`chrome-devtools-mcp-main.ts` currently has no shutdown handler. After a
session calls `navigate_page` (or anything else that launches Chrome),
the Chrome subprocess keeps the Node event loop ref'd, so closing stdin
(the stdio MCP convention for "I'm done") doesn't make the server exit.
Callers that close stdin to terminate the server have to fall back to
SIGTERM / SIGKILL on every page-loaded session — deterministically, not
flakily.

This change:

1. Adds `closeBrowser()` in `browser.ts` that calls `browser.close()`
for launched instances (reaps the Chrome subprocess) and
`browser.disconnect()` for attached instances (leaves the user's Chrome
alive). No-op if no browser is active or the connection has already been
dropped.

2. Registers shutdown handlers in `chrome-devtools-mcp-main.ts` for:
   - `stdin.on('end' | 'close')` — stdio MCP transport convention
- `SIGTERM` / `SIGINT` / `SIGHUP` — clients that signal instead of
closing stdin (`SIGHUP` for parity with `src/daemon/daemon.ts`)

The handler is idempotent (guarded `shuttingDown` flag), and has an
unref'd 10s timeout backstop in case Chrome teardown hangs (slow
`beforeunload` handlers, many tabs, etc.).

### Note on scope

This complements (does not replace) the client-side fixes filed against
#1765, e.g. google-gemini/gemini-cli#13391 and
anthropics/claude-code#42300. The MCP stdio convention is that closing
stdin signals shutdown; a server that doesn't honor that forces every
client to special-case it. The watchdog sub-process
(`src/telemetry/watchdog/main.ts:145-146`) and the daemon
(`src/daemon/daemon.ts:224-230`) both already implement this for the
same reason — this PR extends the same pattern to the main entry point
so all three execution paths behave consistently.

### Measurement

Repro script in #2116, same env (chrome-devtools-mcp@1.0.1, Chrome
148.0.7778.178, Node v24.11.1, Linux), 10 iterations:

| Scenario | Before | After |
|---|---|---|
| `tools/list only` (no navigation) | 10/10 clean, 30-37 ms | 10/10
clean, 29-40 ms |
| `navigate example.com` | 10/10 SIGTERM at ~5080 ms | 10/10 clean at
145-180 ms |

### Notes

- I didn't add a subprocess-based test for this; the existing
`tests/utils.ts:runCli` infrastructure targets the `chrome-devtools`
CLI, not the stdio MCP server, and a shutdown-timing test would
introduce non-trivial Chrome-startup flakiness in CI. Happy to add one
if maintainers want it — pointer to the right test directory
appreciated.
2026-05-26 13:36:15 +00:00
Alex Rudenko 176eb69513 fix: use realpath for MCP roots validation (#2127) 2026-05-26 13:04:43 +00:00
Nicholas Roscino 2eab509380 chore: fixed typo from longtitude to longitude (#2132) 2026-05-26 10:07:34 +00:00
Alex Rudenko 1b51a520f2 fix(cli): address pid file creation issues (#2124) 2026-05-26 09:28:46 +00:00
Wolfgang Beyer 57f32b0cd4 fix: Fix throttling info in performance trace output (#2096)
This addresses #1955.

Throttling information needs to be passed to the parser for the output
to be correct.
2026-05-22 08:08:56 +00:00
Wolfgang Beyer 3ade962a8d fix: Apply CPU throttling to secondary CDP session (#2092)
This addresses #1955 

CPU throttling needs to be applied to both the primary puppeteer session
and the secondary CDP session from the DevTools universe to have an
effect.

For network throttling this does not seem to be the case, I can see a
slowdown with the current implementation which only applies the network
throttling to the primary CDP session.

I also had to increase the navigation timeout to prevent timeout errors.
2026-05-22 07:17:30 +00:00
Pedro Durek 6992106d1c feat: add extraHttpHeaders emulation to emulate tool (#1176)
## Summary

Extend the existing `emulate` tool with an `extraHTTPHeaders` parameter
that calls Puppeteer's `page.setExtraHTTPHeaders()` (which uses CDP
`Network.setExtraHTTPHeaders` under the hood).

Closes #1175

## Approach

Per [feedback from
@natorion](https://github.com/ChromeDevTools/chrome-devtools-mcp/issues/1175#issuecomment-4097587153),
this integrates into the existing `emulate` tool rather than adding a
standalone tool. The `emulate` tool is already the central hub for
page-level state modifications (userAgent, viewport, networkConditions,
geolocation, colorScheme), and custom HTTP headers fit naturally
alongside them. This also avoids increasing the MCP tool count and LLM
token overhead.

## Changes

- **`src/types.ts`** — Added `extraHTTPHeaders?: Record<string, string>`
to `EmulationSettings`
- **`src/tools/emulation.ts`** — Added `extraHTTPHeaders` as an optional
zod parameter on the `emulate` tool
- **`src/McpContext.ts`** — Added handler logic in the `emulate()`
method:
- Calls `page.setExtraHTTPHeaders()` when `extraHTTPHeaders` is provided
  - Clears from settings when an empty `{}` is passed
- Preserves existing headers when the param is **omitted** (unlike other
emulation settings that reset when omitted) — prevents
`emulate({colorScheme: "dark"})` from accidentally clearing
previously-set headers
- **`tests/tools/emulation.test.ts`** — Added 5 test cases:
  1. Sets extra headers on requests
  2. Clears headers with `{}`
  3. Headers persist across navigations
  4. Does not affect other emulation settings
  5. Reports correctly per-page (new page has no headers)

## Use Case

This enables setting custom HTTP headers on **all** requests — including
the initial document navigation and `<script>` tag loads — which
`initScript` cannot do since it runs after the document is already
fetched.

## Usage

```js
// Set headers
emulate({ extraHTTPHeaders: { "X-Custom": "value", "Authorization": "Bearer token" } })

// Clear headers
emulate({ extraHTTPHeaders: {} })

// Combine with other emulation settings
emulate({ extraHTTPHeaders: { "X-Branch": "feature-1" }, userAgent: "MyBot/1.0" })
```

---------

Co-authored-by: Alex Rudenko <alexrudenko@chromium.org>
Co-authored-by: Nicholas Roscino <nroscino@google.com>
2026-05-20 09:37:27 +00:00
Samiya Caur d751693d88 fix: make pageId required (#2084)
Refs: #2052

Co-authored-by: Samiya Caur <samiyac@chromium.org>
2026-05-19 11:27:36 +00:00
Nikolay Vitkov 32dc50d59b chore(memory): update names and exposed information (#2079)
Update the tools to all include the `heapsnapshot` term for easier
handling.
Renames UID to ID to reduce confusion with the snapshot UIDs.
Renames Id to NodeId to better differentiate from the base Id.
Remove EdgeIndex as it was not useful.

Closes:
https://github.com/ChromeDevTools/chrome-devtools-mcp/issues/1970
2026-05-18 16:49:41 +00:00
browser-automation-bot 2a79b426f3 chore(main): release chrome-devtools-mcp 1.0.1 (#2081)
publish-on-tag / publish-to-npm (push) Has been cancelled
publish-on-tag / publish-to-mcp-registry (push) Has been cancelled
🤖 I have created a release *beep* *boop*
---


##
[1.0.1](https://github.com/ChromeDevTools/chrome-devtools-mcp/compare/chrome-devtools-mcp-v1.0.0...chrome-devtools-mcp-v1.0.1)
(2026-05-18)


### 🛠️ Fixes

* include saved image paths in CLI JSON output
([#2070](https://github.com/ChromeDevTools/chrome-devtools-mcp/issues/2070))
([a9fb555](https://github.com/ChromeDevTools/chrome-devtools-mcp/commit/a9fb555c806122bc03bbca75d9bc03197d7f45b6))


### 📄 Documentation

* add version to the LTS
([#2080](https://github.com/ChromeDevTools/chrome-devtools-mcp/issues/2080))
([a2083a2](https://github.com/ChromeDevTools/chrome-devtools-mcp/commit/a2083a2eddc687e53646877e36b784f2d4ced0e0))

---
This PR was generated with [Release
Please](https://github.com/googleapis/release-please). See
[documentation](https://github.com/googleapis/release-please#release-please).
2026-05-18 15:57:41 +02:00
lmlm a9fb555c80 fix: include saved image paths in CLI JSON output (#2070)
Fixes #1910

Summary:
- save image content before returning structured CLI JSON output
- include saved image metadata in `structuredContent.images`
- add coverage for JSON output with image content

Tests:
- `npm test -- tests/daemon/client.test.ts`
- `npx eslint src/daemon/client.ts tests/daemon/client.test.ts && npx
prettier --check src/daemon/client.ts tests/daemon/client.test.ts`

Co-authored-by: Nicholas Roscino <nroscino@google.com>
2026-05-18 13:46:41 +00:00
browser-automation-bot 41361a804d chore(main): release chrome-devtools-mcp 1.0.0 (#2077)
publish-on-tag / publish-to-npm (push) Has been cancelled
publish-on-tag / publish-to-mcp-registry (push) Has been cancelled
🤖 I have created a release *beep* *boop*
---


##
[1.0.0](https://github.com/ChromeDevTools/chrome-devtools-mcp/compare/chrome-devtools-mcp-v0.26.0...chrome-devtools-mcp-v1.0.0)
(2026-05-18)


### 🎉 Features

* report new URL after actions that trigger navigation
([#1853](https://github.com/ChromeDevTools/chrome-devtools-mcp/issues/1853))
([b594858](https://github.com/ChromeDevTools/chrome-devtools-mcp/commit/b5948582a0a143d48b43d64a87cff1f9027e12e3))
* support filePath in evaluate_script
([#2054](https://github.com/ChromeDevTools/chrome-devtools-mcp/issues/2054))
([90d368d](https://github.com/ChromeDevTools/chrome-devtools-mcp/commit/90d368d34365507d88b1eabf0e7a7a8a240ac019))


### 🛠️ Fixes

* disable NetworkManager in DevTools
([#1834](https://github.com/ChromeDevTools/chrome-devtools-mcp/issues/1834))
([d0e6539](https://github.com/ChromeDevTools/chrome-devtools-mcp/commit/d0e6539ef426a8313ec9266a3b3c5f0511275bdf))
* do not use getSelectedMcpPage
([85f935b](https://github.com/ChromeDevTools/chrome-devtools-mcp/commit/85f935b2be2d202545d4b8c2af4f15b77a271418))
* improve geolocation emulation
([#2036](https://github.com/ChromeDevTools/chrome-devtools-mcp/issues/2036))
([213720b](https://github.com/ChromeDevTools/chrome-devtools-mcp/commit/213720b69cdc84fc03e1e5b96bfae287d8ffe812))
* report unknown tool arguments
([#2064](https://github.com/ChromeDevTools/chrome-devtools-mcp/issues/2064))
([041b208](https://github.com/ChromeDevTools/chrome-devtools-mcp/commit/041b2083781e4c2f027ea9c71479e4db3beb7fa7))
* respect user's npm registry configuration in update check
([#2038](https://github.com/ChromeDevTools/chrome-devtools-mcp/issues/2038))
([83a299f](https://github.com/ChromeDevTools/chrome-devtools-mcp/commit/83a299fc95c6d561acab520837c805ab37ecfde3))


### 📄 Documentation

* explain concurrent session options
([#2062](https://github.com/ChromeDevTools/chrome-devtools-mcp/issues/2062))
([41944b3](https://github.com/ChromeDevTools/chrome-devtools-mcp/commit/41944b3265a3d2c812fcb55843acd20d039a8748))
* fix typo
([#2075](https://github.com/ChromeDevTools/chrome-devtools-mcp/issues/2075))
([1deb4f8](https://github.com/ChromeDevTools/chrome-devtools-mcp/commit/1deb4f8a8b414a06bd0caac37b78acfc46143703))
* remove windows workaround and document Node LTS support
([#2074](https://github.com/ChromeDevTools/chrome-devtools-mcp/issues/2074))
([30dcd0b](https://github.com/ChromeDevTools/chrome-devtools-mcp/commit/30dcd0ba965d7195952af141c6799a7e50ee4038))
* unhide various experimental flags
([#2055](https://github.com/ChromeDevTools/chrome-devtools-mcp/issues/2055))
([081c903](https://github.com/ChromeDevTools/chrome-devtools-mcp/commit/081c9033d601703e19e97072c69b4263efae5b6a))


### 🏗️ Refactor

* waitForResult helpers
([#2041](https://github.com/ChromeDevTools/chrome-devtools-mcp/issues/2041))
([f6a12be](https://github.com/ChromeDevTools/chrome-devtools-mcp/commit/f6a12be091dc033a31edfbe4b3a47c41579f6e92))

---
This PR was generated with [Release
Please](https://github.com/googleapis/release-please). See
[documentation](https://github.com/googleapis/release-please#release-please).
2026-05-18 13:16:36 +00:00
yulunz d0e6539ef4 fix: disable NetworkManager in DevTools (#1834)
Co-authored-by: Alex Rudenko <alexrudenko@chromium.org>
2026-05-18 12:31:52 +00:00
Alex Rudenko 213720b69c fix: improve geolocation emulation (#2036)
- add a message about successful configuration
- add a message about the currently emulated geolocation
- switch to comma separate format instead of `x` separator.

Tested with https://www.audero.it/demo/geolocation-api-demo.html
2026-05-18 12:13:12 +00:00
Alex Rudenko 1deb4f8a8b docs: fix typo (#2075)
Closes https://github.com/ChromeDevTools/chrome-devtools-mcp/pull/2063
2026-05-18 09:56:09 +00:00
Nikolay Vitkov b2b05a0670 chore(memory): expose retainer logic (#2056)
Allows the LLM to query the heapsnapshot further to understand what the
retainer path logic.
2026-05-18 09:54:00 +00:00
dependabot[bot] 20021469dc chore(deps-dev): bump puppeteer from 24.43.0 to 25.0.2 in the bundled group across 1 directory (#2045)
Bumps the bundled group with 1 update in the / directory:
[puppeteer](https://github.com/puppeteer/puppeteer).

Updates `puppeteer` from 24.43.0 to 25.0.2
<details>
<summary>Release notes</summary>
<p><em>Sourced from <a
href="https://github.com/puppeteer/puppeteer/releases">puppeteer's
releases</a>.</em></p>
<blockquote>
<h2>puppeteer-core: v25.0.2</h2>
<h2><a
href="https://github.com/puppeteer/puppeteer/compare/puppeteer-core-v25.0.1...puppeteer-core-v25.0.2">25.0.2</a>
(2026-05-15)</h2>
<h3>🛠️ Fixes</h3>
<ul>
<li>update docs text (<a
href="https://redirect.github.com/puppeteer/puppeteer/issues/14992">#14992</a>)
(<a
href="https://github.com/puppeteer/puppeteer/commit/36527b8b9dd856e11a372b46cba23409e5613573">36527b8</a>)</li>
</ul>
<h3>Dependencies</h3>
<ul>
<li>The following workspace dependencies were updated
<ul>
<li>dependencies
<ul>
<li><code>@​puppeteer/browsers</code> bumped from 3.0.1 to 3.0.2</li>
</ul>
</li>
</ul>
</li>
</ul>
<h2>puppeteer: v25.0.2</h2>
<h2><a
href="https://github.com/puppeteer/puppeteer/compare/puppeteer-v25.0.1...puppeteer-v25.0.2">25.0.2</a>
(2026-05-15)</h2>
<h3>♻️ Chores</h3>
<ul>
<li><strong>puppeteer:</strong> Synchronize puppeteer versions</li>
</ul>
<h3>Dependencies</h3>
<ul>
<li>The following workspace dependencies were updated
<ul>
<li>dependencies
<ul>
<li><code>@​puppeteer/browsers</code> bumped from 3.0.1 to 3.0.2</li>
<li>puppeteer-core bumped from 25.0.1 to 25.0.2</li>
</ul>
</li>
</ul>
</li>
</ul>
<h2>puppeteer-core: v25.0.1</h2>
<h2><a
href="https://github.com/puppeteer/puppeteer/compare/puppeteer-core-v25.0.0...puppeteer-core-v25.0.1">25.0.1</a>
(2026-05-13)</h2>
<h3>🛠️ Fixes</h3>
<ul>
<li>enabled features should take precedence over disabled features (<a
href="https://redirect.github.com/puppeteer/puppeteer/issues/14985">#14985</a>)
(<a
href="https://github.com/puppeteer/puppeteer/commit/f6fd7c29f92e6183b2fd48f0571957306c58d440">f6fd7c2</a>)</li>
<li>roll to Chrome 148.0.7778.167 (<a
href="https://redirect.github.com/puppeteer/puppeteer/issues/14980">#14980</a>)
(<a
href="https://github.com/puppeteer/puppeteer/commit/84c46fede6b02a1e9a00104b97b28c263f0c84df">84c46fe</a>)</li>
<li>roll to Firefox 150.0.3 (<a
href="https://redirect.github.com/puppeteer/puppeteer/issues/14983">#14983</a>)
(<a
href="https://github.com/puppeteer/puppeteer/commit/872f77822d6b6b9b6510752d838107a967241bdb">872f778</a>)</li>
</ul>
<h3>Dependencies</h3>
<ul>
<li>The following workspace dependencies were updated
<ul>
<li>dependencies
<ul>
<li><code>@​puppeteer/browsers</code> bumped from 3.0.0 to 3.0.1</li>
</ul>
</li>
</ul>
</li>
</ul>
<h2>puppeteer: v25.0.1</h2>
<h2><a
href="https://github.com/puppeteer/puppeteer/compare/puppeteer-v25.0.0...puppeteer-v25.0.1">25.0.1</a>
(2026-05-13)</h2>
<!-- raw HTML omitted -->
</blockquote>
<p>... (truncated)</p>
</details>
<details>
<summary>Changelog</summary>
<p><em>Sourced from <a
href="https://github.com/puppeteer/puppeteer/blob/main/CHANGELOG.md">puppeteer's
changelog</a>.</em></p>
<blockquote>
<h2><a
href="https://github.com/puppeteer/puppeteer/compare/puppeteer-v25.0.1...puppeteer-v25.0.2">25.0.2</a>
(2026-05-15)</h2>
<h3>♻️ Chores</h3>
<ul>
<li><strong>puppeteer:</strong> Synchronize puppeteer versions</li>
</ul>
<h3>Dependencies</h3>
<ul>
<li>The following workspace dependencies were updated
<ul>
<li>dependencies
<ul>
<li><code>@​puppeteer/browsers</code> bumped from 3.0.1 to 3.0.2</li>
</ul>
</li>
</ul>
</li>
</ul>
<h3>🛠️ Fixes</h3>
<ul>
<li>update docs text (<a
href="https://redirect.github.com/puppeteer/puppeteer/issues/14992">#14992</a>)
(<a
href="https://github.com/puppeteer/puppeteer/commit/36527b8b9dd856e11a372b46cba23409e5613573">36527b8</a>)</li>
</ul>
<h2><a
href="https://github.com/puppeteer/puppeteer/compare/puppeteer-v25.0.0...puppeteer-v25.0.1">25.0.1</a>
(2026-05-13)</h2>
<h3>♻️ Chores</h3>
<ul>
<li><strong>puppeteer:</strong> Synchronize puppeteer versions</li>
</ul>
<h3>Dependencies</h3>
<ul>
<li>The following workspace dependencies were updated
<ul>
<li>dependencies
<ul>
<li><code>@​puppeteer/browsers</code> bumped from 3.0.0 to 3.0.1</li>
</ul>
</li>
</ul>
</li>
</ul>
<h3>🛠️ Fixes</h3>
<ul>
<li>enabled features should take precedence over disabled features (<a
href="https://redirect.github.com/puppeteer/puppeteer/issues/14985">#14985</a>)
(<a
href="https://github.com/puppeteer/puppeteer/commit/f6fd7c29f92e6183b2fd48f0571957306c58d440">f6fd7c2</a>)</li>
<li>roll to Chrome 148.0.7778.167 (<a
href="https://redirect.github.com/puppeteer/puppeteer/issues/14980">#14980</a>)
(<a
href="https://github.com/puppeteer/puppeteer/commit/84c46fede6b02a1e9a00104b97b28c263f0c84df">84c46fe</a>)</li>
<li>roll to Firefox 150.0.3 (<a
href="https://redirect.github.com/puppeteer/puppeteer/issues/14983">#14983</a>)
(<a
href="https://github.com/puppeteer/puppeteer/commit/872f77822d6b6b9b6510752d838107a967241bdb">872f778</a>)</li>
</ul>
<h2><a
href="https://github.com/puppeteer/puppeteer/compare/puppeteer-v24.43.1...puppeteer-v25.0.0">25.0.0</a>
(2026-05-12)</h2>
<h3>⚠ BREAKING CHANGES</h3>
<ul>
<li>remove deprecated Puppeteer.product (<a
href="https://redirect.github.com/puppeteer/puppeteer/issues/14977">#14977</a>)</li>
<li>bump min NodeJS to 22 (<a
href="https://redirect.github.com/puppeteer/puppeteer/issues/14973">#14973</a>)</li>
<li>return a Promise for executablePath, defaultArgs (<a
href="https://redirect.github.com/puppeteer/puppeteer/issues/14965">#14965</a>)</li>
</ul>
<!-- raw HTML omitted -->
</blockquote>
<p>... (truncated)</p>
</details>
<details>
<summary>Commits</summary>
<ul>
<li><a
href="https://github.com/puppeteer/puppeteer/commit/3aadc38c533caa8df87f381868291ede870883e2"><code>3aadc38</code></a>
chore: release main (<a
href="https://redirect.github.com/puppeteer/puppeteer/issues/14993">#14993</a>)</li>
<li><a
href="https://github.com/puppeteer/puppeteer/commit/36527b8b9dd856e11a372b46cba23409e5613573"><code>36527b8</code></a>
fix: update docs text (<a
href="https://redirect.github.com/puppeteer/puppeteer/issues/14992">#14992</a>)</li>
<li><a
href="https://github.com/puppeteer/puppeteer/commit/3ea7bd54b97965fb0e1b83a2c017720162785c92"><code>3ea7bd5</code></a>
fix: capitalize &quot;Chrome&quot; in troubleshooting.md (<a
href="https://redirect.github.com/puppeteer/puppeteer/issues/14991">#14991</a>)</li>
<li><a
href="https://github.com/puppeteer/puppeteer/commit/ae72fdbec9720c982fc2ed818036d7be9b2aa1dc"><code>ae72fdb</code></a>
chore: Tiny punctuation update in troubleshooting.md (<a
href="https://redirect.github.com/puppeteer/puppeteer/issues/14990">#14990</a>)</li>
<li><a
href="https://github.com/puppeteer/puppeteer/commit/1597fde55de1e7b3c31032aa43dce0607b4307d3"><code>1597fde</code></a>
chore: release main (<a
href="https://redirect.github.com/puppeteer/puppeteer/issues/14982">#14982</a>)</li>
<li><a
href="https://github.com/puppeteer/puppeteer/commit/f6fd7c29f92e6183b2fd48f0571957306c58d440"><code>f6fd7c2</code></a>
fix: enabled features should take precedence over disabled features (<a
href="https://redirect.github.com/puppeteer/puppeteer/issues/14985">#14985</a>)</li>
<li><a
href="https://github.com/puppeteer/puppeteer/commit/bf05fb9bf5bac997e365eda2e31c6067e5ec1677"><code>bf05fb9</code></a>
fix: update browsers to trigger release (<a
href="https://redirect.github.com/puppeteer/puppeteer/issues/14984">#14984</a>)</li>
<li><a
href="https://github.com/puppeteer/puppeteer/commit/872f77822d6b6b9b6510752d838107a967241bdb"><code>872f778</code></a>
fix: roll to Firefox 150.0.3 (<a
href="https://redirect.github.com/puppeteer/puppeteer/issues/14983">#14983</a>)</li>
<li><a
href="https://github.com/puppeteer/puppeteer/commit/84c46fede6b02a1e9a00104b97b28c263f0c84df"><code>84c46fe</code></a>
fix: roll to Chrome 148.0.7778.167 (<a
href="https://redirect.github.com/puppeteer/puppeteer/issues/14980">#14980</a>)</li>
<li><a
href="https://github.com/puppeteer/puppeteer/commit/ee655d8292f37cc33f279746ef72613e5ccb5db8"><code>ee655d8</code></a>
chore(main): release ng-schematics 0.8.0 (<a
href="https://redirect.github.com/puppeteer/puppeteer/issues/14978">#14978</a>)</li>
<li>Additional commits viewable in <a
href="https://github.com/puppeteer/puppeteer/compare/puppeteer-v24.43.0...puppeteer-v25.0.2">compare
view</a></li>
</ul>
</details>
<br />

---------

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Alex Rudenko <alexrudenko@chromium.org>
2026-05-17 06:34:22 +00:00
lmlm 041b208378 fix: report unknown tool arguments (#2064)
## Summary
- register tool input schemas as passthrough so extra named arguments
reach ToolHandler validation
- report unknown arguments with an explicit error that names the unknown
and expected arguments
- stop before invoking tool handlers when unknown arguments are present
- add ToolHandler coverage for reporting an extra argument

Fixes #1940

## Tests
- `npm run check-format`
- `npx tsc --noEmitOnError false` *(emits build artifacts but still
reports the existing `chrome-devtools-frontend` type conflict in
`ModelImpl.ts`)*
- `node --experimental-strip-types --no-warnings=ExperimentalWarning
scripts/post-build.ts`
- `NODE_TEST_REPORTER=spec npm run test:no-build --
tests/ToolHandler.test.ts`
2026-05-15 15:52:57 +00:00
yulunz 3efd8c0194 chore: add sanity check to error enums (#2059)
This also caught and fixed an issue where the enum index is not
sequential :/

No error enums have been defined on the service side yet so it's
possible to modify the enum index directly.
2026-05-14 22:39:15 +00:00
yulunz e14a74c859 chore: disallow underscores followed by numbers in metrics names (#2058)
Underscore followed by numbers is not encouraged in the proto style
guide. See "Underscores in Identifiers" in
https://protobuf.dev/programming-guides/style/.

This recently became an issue because we have `list_3p_developer_tools`
and `execute_3p_developer_tool` which would have been dis-allowed. This
change replaces them with `list3p_developer_tools` and
`execute3p_developer_tool` respectively, as suggested by the style
guide.

This only affects the logged version. The tool name is still the
existing one.

This transformation is also applied to other similar places, like flag
names, tool name in error logging, and tool args.

The `tool_name_metrics.json` was manually updated because we never
landed the server side change because it was disallowed by proto style
check.
2026-05-14 20:31:44 +00:00
@masamaru0513 90d368d343 feat: support filePath in evaluate_script (#2054)
## Summary

Adds an optional `filePath` parameter to `evaluate_script` that saves
the script output to a file instead of returning it inline.

Refs #153

## Motivation

Issue #153 requested `filePath` support for `take_snapshot` and
`evaluate_script`. `take_snapshot` was addressed in #463. PR #248
previously attempted this but was closed due to conflicts. This PR
implements the same feature on the current codebase, completing the
remaining piece.

## Changes

- Add optional `filePath` parameter to the `evaluate_script` schema
- Add `context.validatePath(filePath)` call for path validation
- Pass `{filePath, context}` options to `performEvaluation()`
- In `performEvaluation()`: when `filePath` is provided, save output via
`context.saveFile()` with `.json` extension; otherwise return inline as
before
- Update `docs/tool-reference.md` via `npm run docs:generate`
- Add unit test for file output

## Key design decisions

- **Same pattern as existing tools**: Follows the `context.saveFile()`
pattern established by `take_snapshot` (#463), `take_screenshot`,
`get_network_request` (#795), and performance tools (#686).
- **Minimal change surface**: Only `performEvaluation()` gains an
optional `options` parameter. No new interfaces or abstractions.
- **Backwards compatible**: `filePath` is optional. When omitted,
behavior is identical to before.

## Testing

**Unit test added** (`tests/tools/script.test.ts`):
- Call `evaluate_script` with `filePath` set to a temp file
- Assert response contains "Output saved to"
- Assert file content matches the JSON-serialized return value
- Clean up temp file in `finally` block

**Manual testing performed**:
- `() => document.title` with `filePath: /tmp/test.json` → file contains
`"Example Domain"`
- `() => document.title` without `filePath` → inline ```json block
returned (no regression)
- `() => Array.from({length: 100}, ...)` with `filePath` → 100-item
array saved correctly
- `filePath` pointing to non-existent directory → directory
auto-created, file saved
- Relative path (`test.json`) → resolved to CWD, absolute path shown in
response
- Function that throws → error returned, no partial file created
- Existing file as `filePath` → file overwritten completely

---------

Co-authored-by: Alex Rudenko <alexrudenko@chromium.org>
2026-05-14 08:33:27 +00:00
yulunz 71ccdb0dbf chore: better organize telemetry utilities (#2057)
There is no behavior change. 

This groups utilities into two modules:
- `transformation.ts`: for any logic related to mutating / filtering of
the names, values of telemetry entries.
- `metricsRegistry.ts`: for any logic that related to the maintenance of
metrics.json files.
2026-05-14 05:33:40 +00:00
Alex Rudenko 081c9033d6 docs: unhide various experimental flags (#2055)
Refs: https://github.com/ChromeDevTools/chrome-devtools-mcp/issues/2052
2026-05-13 16:36:18 +00:00