Skip to content

chore: Make in-page tools work with pageId routing#1781

Merged
wolfib merged 4 commits intomainfrom
page-id-in-page-tools-fix
Apr 1, 2026
Merged

chore: Make in-page tools work with pageId routing#1781
wolfib merged 4 commits intomainfrom
page-id-in-page-tools-fix

Conversation

@wolfib
Copy link
Copy Markdown
Contributor

@wolfib wolfib commented Apr 1, 2026

This moves the stored ToolGroup from McpContext to McpPage, where per-page state should be stored in order for pageId-based routing to work correctly.

When appending the list of in-page tools to a response, the list now corresponds to the response's McpPage, and only falls back to the selected McpPage for tools which are not page-specific.

@wolfib wolfib changed the title Make in-page tools work with pageId routing chore: Make in-page tools work with pageId routing Apr 1, 2026
browser-automation-bot and others added 3 commits April 1, 2026 12:22
🤖 I have created a release *beep* *boop*
---


##
[0.21.0](chrome-devtools-mcp-v0.20.3...chrome-devtools-mcp-v0.21.0)
(2026-04-01)


### 🎉 Features

* add a skill for detecting memory leaks using take_memory_snapshot tool
([#1162](#1162))
([d19a235](d19a235))


### 🛠️ Fixes

* **cli:** avoid defaulting to isolated when userDataDir is provided
([#1258](#1258))
([73e1e24](73e1e24))
* list_pages should work after selected page is closed
([#1145](#1145))
([2664455](2664455))
* mark lighthouse and memory as non-read-only
([#1769](#1769))
([bec9dae](bec9dae))
* **telemetry:** record client name
([9a47b65](9a47b65))
* versioning for Claude Code plugin
([#1233](#1233))
([966b86f](966b86f))
* wrap .mcp.json config in mcpServers key
([#1246](#1246))
([c7948cf](c7948cf))


### 📄 Documentation

* Command Code CLI instructions for MCP server
([0a7c0a7](0a7c0a7))
* provide disclaimer about supported browsers
([#1237](#1237))
([8676b72](8676b72))


### 🏗️ Refactor

* set process titles for easier debugging
([#1770](#1770))
([0fe3896](0fe3896))

---
This PR was generated with [Release
Please](https://github.com/googleapis/release-please). See
[documentation](https://github.com/googleapis/release-please#release-please).

---------

Co-authored-by: Alex Rudenko <alexrudenko@chromium.org>
Splits out from #1244 per review feedback.

'waitForEventsAfterAction' previously lived in 'McpContext' and always
used the selected page's CPU/network throttling settings. With pageId
routing, a tool can target a different page than the selected one,
meaning wrong throttling multipliers were applied.

Moving the method to 'McpPage' fixes this: each tool now calls
'page.waitForEventsAfterAction(...)' and gets the correct page's
emulation settings.

'getNetworkMultiplierFromString' is extracted to 'WaitForHelper.ts' to
avoid a circular import (McpContext → McpPage already exists).

Unblocks #1777.
@wolfib wolfib requested a review from OrKoN April 1, 2026 12:42
@wolfib wolfib added this pull request to the merge queue Apr 1, 2026
Merged via the queue into main with commit 7912ca4 Apr 1, 2026
31 of 33 checks passed
@wolfib wolfib deleted the page-id-in-page-tools-fix branch April 1, 2026 13:00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants