Skip to content

Execute_3p_developer_tool fails with "No tools found on the page" after the page reloads itself #2973

Description

@coygeek

Description of the bug

After a page that exposes third-party developer tools navigates or reloads on its own (here location.reload() from page script), execute_3p_developer_tool for a tool the page still registers fails with Error: No tools found on the page. The server keeps the tool list from before the navigation, while the page-side state that executes tools was reset by the reload, and nothing re-discovers the tools. The call works again only after list_3p_developer_tools or a navigate_page.

Actual behavior

Both builds, identical results:

list_3p_developer_tools          isError=false  ## Third-party developer tools / Demo: Demo tools / ... name="add" ...
execute_3p_developer_tool add    isError=false  5
evaluate_script (page reloads)   isError=false  "reloading"
execute_3p_developer_tool add    isError=true   Error: No tools found on the page
navigate_page reload             isError=false  Successfully reloaded the page. ... ## Third-party developer tools ... name="add" ...
execute_3p_developer_tool add    isError=false  5

Reproduction

  1. Serve this page locally as 3p.html (the listener follows the guide's example):
<!doctype html><title>3P add</title>
<script>
window.addEventListener('devtoolstooldiscovery', event => {
  event.respondWith({name: 'Demo', description: 'Demo tools', tools: [
    {name: 'add', description: 'Sum two numbers', inputSchema: {type: 'object', properties: {a: {type: 'number'}, b: {type: 'number'}}, required: ['a', 'b']}, execute: ({a, b}) => a + b},
  ]});
});
</script>
  1. Send these tool calls in order, waiting about 1.5 seconds after the evaluate_script call:
{"name":"new_page","arguments":{"url":"http://127.0.0.1:<port>/3p.html"}}
{"name":"list_3p_developer_tools","arguments":{"pageId":2}}
{"name":"execute_3p_developer_tool","arguments":{"pageId":2,"toolName":"add","params":"{\"a\":2,\"b\":3}"}}
{"name":"evaluate_script","arguments":{"pageId":2,"function":"() => { setTimeout(() => location.reload(), 100); return 'reloading'; }"}}
{"name":"execute_3p_developer_tool","arguments":{"pageId":2,"toolName":"add","params":"{\"a\":2,\"b\":3}"}}
{"name":"navigate_page","arguments":{"pageId":2,"type":"reload"}}
{"name":"execute_3p_developer_tool","arguments":{"pageId":2,"toolName":"add","params":"{\"a\":2,\"b\":3}"}}

Expectation

docs/third-party-developer-tools.md (How It Works: Tool Discovery): "Chrome DevTools for Agents requests this list automatically after page navigations (e.g., new_page, navigate_page) or when explicitly requested via the list_3p_developer_tools() MCP tool." A reload is a page navigation, and the page registers the same tool again on load. After the page reloads, execute_3p_developer_tool should run the page's current add tool (or re-discover it), not fail while the tool is available.

MCP configuration

--headless --isolated --no-usage-statistics --no-performance-crux unless the reproduction states otherwise (update checks disabled with CHROME_DEVTOOLS_MCP_NO_UPDATE_CHECKS=1).

Chrome DevTools MCP version

1.10.1 (npm) and main 5ddb0a3 (local build)

Chrome version

154.0.8037.98 (stable)

Node version

v22.23.2

Operating system

macOS 27.0

Environment details

  • chrome-devtools-mcp 1.10.1 from npm (the release build) and upstream main at commit 5ddb0a3110c5059f8e5513e566196cce2a35c6d1 built from source (the main build).
  • Google Chrome 154.0.8037.98 (stable), Node.js v22.23.2, macOS 27.
  • Server started with --isolated --headless --no-usage-statistics --no-performance-crux --categoryExperimentalThirdParty and CHROME_DEVTOOLS_MCP_NO_UPDATE_CHECKS=1, driven by a minimal stdio MCP client.

Evidence

  • Expected source: docs/third-party-developer-tools.md, note under "How It Works: Tool Discovery", both builds.
  • Failure source: my runs of the steps above on both builds, outputs quoted under Actual behavior; static breadcrumb on the main build: execute_3p_developer_tool finds the tool in the list cached on McpPage and then executes it through the page-side window.__dtmcp state (src/McpPage.ts), which the reload has cleared; no discovery runs after a navigation the page starts itself.
  • Evidence provenance: observed
  • Local verification: reproduced
  • Reproduction completeness: complete

Fix check

Run step 2. Failing: the execute_3p_developer_tool call after the page-initiated reload returns Error: No tools found on the page. Passing: that call returns 5 without an intervening list_3p_developer_tools or navigate_page. Control (not run during this investigation): with a variant of the page that registers add only on its first load, for example wrapping the listener in if (!sessionStorage.getItem('loaded')) { sessionStorage.setItem('loaded', '1'); window.addEventListener('devtoolstooldiscovery', ...); }, the call after the page-initiated reload still fails with a not-found error rather than running a stale tool.

Additional context

The full open and closed issue and pull request corpus was screened as of 2026-10-06; no issue covers this. The tools are also not discovered right after new_page, which fails with a different error (Error: Tool add not found) and has a different cause; it is reported separately. Closed #2453 concerned element handles in the same tool.

Activity

  1. added theissue type on Oct 13, 2026
  2. added and removed on Oct 13, 2026
  3. OrKoN commented on Oct 13, 2026

    @OrKoN
    Collaborator

    @wolfib PTAL

  4. added a commit that references this issue on Oct 16, 2026
    2777fa0
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions