Skip to content

chore: Add a new tool for listing in-page tools (gated behind a command line flag)#1239

Merged
wolfib merged 7 commits intomainfrom
add-in-page-tools
Mar 30, 2026
Merged

chore: Add a new tool for listing in-page tools (gated behind a command line flag)#1239
wolfib merged 7 commits intomainfrom
add-in-page-tools

Conversation

@wolfib
Copy link
Copy Markdown
Contributor

@wolfib wolfib commented Mar 25, 2026

This adds a list_in_page_tools MCP tool. When called, it dispatches a devtoolstooldiscovery event on the active page. The page announces its exposing tools by calling the event's respondWith method, which causes the exposed tools to be stashed on the page's window object. This list of in-page tools is then appended to the list_in_page_tools response.

Calling the exposed in-page tools from the MCP server will be handled in a follow-up.

BEGIN_COMMIT_OVERRIDE
chore: Add a new tool for listing in-page tools (gated behind a command line flag)
END_COMMIT_OVERRIDE

@wolfib wolfib changed the title Add a new tool for listing in-page tools (gated behind a command line flag) feat: Add a new tool for listing in-page tools (gated behind a command line flag) Mar 25, 2026
@wolfib wolfib requested a review from Lightning00Blade March 25, 2026 15:16
Copy link
Copy Markdown
Collaborator

@Lightning00Blade Lightning00Blade left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Over all looks good with some comments.

Comment thread src/tools/inPage.ts Outdated
Comment thread src/tools/inPage.ts Outdated
Comment thread src/McpResponse.ts Outdated
Comment thread tests/tools/inPage.test.ts Outdated
Comment thread tests/tools/inPage.test.ts Outdated
Comment thread tests/index.test.ts
Comment thread tests/McpResponse.test.ts Outdated
Comment thread src/McpResponse.ts
@wolfib
Copy link
Copy Markdown
Contributor Author

wolfib commented Mar 30, 2026

Addressed the comments. PTAL again.

@wolfib wolfib added this pull request to the merge queue Mar 30, 2026
Merged via the queue into main with commit cea963b Mar 30, 2026
30 of 33 checks passed
@wolfib wolfib deleted the add-in-page-tools branch March 30, 2026 10:03
@wolfib wolfib changed the title feat: Add a new tool for listing in-page tools (gated behind a command line flag) chore: Add a new tool for listing in-page tools (gated behind a command line flag) Mar 30, 2026
OrKoN pushed a commit to mvanhorn/chrome-devtools-mcp that referenced this pull request Apr 1, 2026
…d line flag) (ChromeDevTools#1239)

This adds a `list_in_page_tools` MCP tool. When called, it dispatches a
`devtoolstooldiscovery` event on the active page. The page announces its
exposing tools by calling the event's `respondWith` method, which causes
the exposed tools to be stashed on the page's `window` object. This list
of in-page tools is then appended to the `list_in_page_tools` response.

Calling the exposed in-page tools from the MCP server will be handled in
a follow-up.
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.

2 participants