{
  "slug": "chrome-devtools-mcp-page-navigation-accepts-initscript-7dafabaa6ff2",
  "title": "chrome-devtools-mcp page navigation accepts initScript",
  "tools": [
    "chrome-devtools-mcp"
  ],
  "tags": [
    "agent"
  ],
  "introduced_at": "2026-01-29T12:38:59.000Z",
  "announced_at": "2026-01-29T12:38:59.000Z",
  "effective_at": null,
  "date_basis": "source-publication",
  "status": "unknown",
  "how": {
    "incantation": "When navigating to a new document, set `initScript` on `navigate_page` to run JavaScript before the page’s other scripts.",
    "examples": [
      "navigate_page({\"pageId\": <pageId>, \"type\": \"url\", \"url\": \"<url>\", \"initScript\": \"<JavaScript>\"})"
    ],
    "gotchas": [
      "Version: 0.15.0",
      "pageId (required): ID of the target page.",
      "initScript: JavaScript executed on each new document before other scripts for the next navigation.",
      "type: Navigation action; use `url` to navigate by URL.",
      "url: Target URL; required when `type` is `url`.",
      "Prerequisite: Use version 0.15.0 or later for this feature.",
      "Prerequisite: JavaScript evaluation must be enabled; the `--javascriptEvaluation` option defaults to true, and setting it to false disables `initScript`.",
      "Runs on each new document before any other scripts for the next navigation."
    ]
  },
  "why_it_matters": "Run setup code on each new document before the page's own scripts during a navigation.",
  "sources": [
    "https://github.com/ChromeDevTools/chrome-devtools-mcp/releases/tag/chrome-devtools-mcp-v0.15.0",
    "https://github.com/ChromeDevTools/chrome-devtools-mcp/pull/568",
    "https://github.com/ChromeDevTools/chrome-devtools-mcp/blob/chrome-devtools-mcp-v0.15.0/docs/tool-reference.md",
    "https://github.com/ChromeDevTools/chrome-devtools-mcp/blob/main/docs/configuration.md"
  ],
  "rank": 0.97031,
  "judge": {
    "publish": true,
    "judge_model": "codex-cli/gpt-6-luna+typesafe/jev-1.13.0",
    "prompt_version": "extract-v7+enrich-v1+judge-v2x3+jev-publish-v1"
  },
  "review_state": "approved",
  "provenance": {
    "run_id": "ghtools-20261008",
    "verdict_id": "ghtools-20261008:ghtools-20261008-79650bb28315ecbd-0:gate",
    "evidence_hash": "dcd5bd69a2749e1fd9008c0ceb856e74885147b8fd0251dd307340df0b4d8602"
  },
  "review": {
    "draft_hash": "fa5be737e3f90da816c3cb1d339564ea83d023a5a24ed0cd736b5320abec582b",
    "reviewer": "publication-gate",
    "reviewed_at": "2026-10-07T00:00:00.000Z",
    "decision": "ghtools-20261008:gate",
    "reason": "3 of 3 judge runs approved with p_yes >= 0.9 (mean 0.97 >= 0.9; 2 needed) and Jev gave 0.77 (>= 0.6 needed)."
  }
}
