{
  "slug": "chrome-devtools-mcp-evaluate-script-saves-output-with-filepath-e3d4c7ed82a7",
  "title": "chrome-devtools-mcp evaluate_script saves output with filePath",
  "tools": [
    "chrome-devtools-mcp"
  ],
  "tags": [
    "agent"
  ],
  "introduced_at": "2026-05-18T13:22:39.000Z",
  "announced_at": "2026-05-18T13:22:39.000Z",
  "effective_at": null,
  "date_basis": "source-publication",
  "status": "unknown",
  "how": {
    "incantation": "When evaluating a page script and its output should be saved, pass `filePath` to `evaluate_script`; omitting it returns the output inline.",
    "examples": [
      "evaluate_script({\"pageId\": <pageId>, \"function\": \"() => document.title\", \"filePath\": \"<absolute-or-relative-path>\"})"
    ],
    "gotchas": [
      "Version: 1.0.0",
      "pageId (required): Targets a specific page by ID.",
      "function: JavaScript source to execute; provide either this or `sourcePath`, not both.",
      "filePath: Absolute or relative path to save the script output; if omitted, output is returned inline.",
      "`filePath` accepts an absolute or relative path.",
      "The `filePath` parameter is optional.",
      "The supplied description says the path is validated."
    ]
  },
  "why_it_matters": "When evaluating a script whose output should be saved to a repository file, provide `filePath` to `evaluate_script`.",
  "sources": [
    "https://github.com/ChromeDevTools/chrome-devtools-mcp/releases/tag/chrome-devtools-mcp-v1.0.0",
    "https://github.com/ChromeDevTools/chrome-devtools-mcp/pull/2054",
    "https://github.com/ChromeDevTools/chrome-devtools-mcp/blob/main/docs/tool-reference.md"
  ],
  "rank": 0.95035,
  "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-331844009d4e1fca-1:gate",
    "evidence_hash": "7cc31e5a8783d9d6d8728e9bacd39f9d991498c907aa79123ffde2b932d05c1f"
  },
  "review": {
    "draft_hash": "edbdebe870c717e86bacc1f9bedd398a063bd140dd0f7cce2bafbd185f1887f8",
    "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.95 >= 0.9; 2 needed) and Jev gave 0.81 (>= 0.6 needed)."
  }
}
