{
  "slug": "evaluate-script-loads-source-code-from-local-files-b869af245e37",
  "title": "evaluate_script loads source code from local files",
  "tools": [
    "chrome-devtools-mcp"
  ],
  "tags": [
    "agent"
  ],
  "introduced_at": "2026-10-15T14:01:41.000Z",
  "announced_at": "2026-10-15T14:01:41.000Z",
  "effective_at": null,
  "date_basis": "source-publication",
  "status": "unknown",
  "how": {
    "incantation": "When evaluating repository JavaScript in a target page, pass its local file path with `--sourcePath` and choose `--format` for how to interpret the source. Provide `sourcePath` or `function`, never both.",
    "examples": [
      "chrome-devtools evaluate_script --pageId 1 --sourcePath /path/to/script.js --format script"
    ],
    "gotchas": [
      "Version: 1.11.0",
      "pageId (required): Targets a specific page by ID.",
      "sourcePath: Absolute or relative path to a JavaScript file on the MCP server's local filesystem; provide this or `function`, but not both.",
      "function: JavaScript source to execute; provide this or `sourcePath`, but not both.",
      "format: `function` interprets source as a function declaration and supports `args`; `script` evaluates classic JavaScript and does not support `args`. Defaults to `function`; ECMAScript modules are unsupported. Values are alternatives.",
      "args: Optional arguments passed to the function; supported with `format: function`.",
      "`sourcePath` is an absolute or relative path on the MCP server's local filesystem.",
      "Provide either `sourcePath` or `function`, but not both.",
      "`function` format treats the source as a function declaration and supports args; `script` evaluates classic JavaScript and does not support args.",
      "ECMAScript modules are not supported.",
      "Returned values must be JSON-serializable.",
      "Local source paths are validated through MCP roots."
    ]
  },
  "why_it_matters": "When evaluating repository JavaScript in a target page, load the script from a local file and select its interpretation mode.",
  "sources": [
    "https://github.com/ChromeDevTools/chrome-devtools-mcp/releases/tag/chrome-devtools-mcp-v1.11.0",
    "https://github.com/ChromeDevTools/chrome-devtools-mcp/pull/2606",
    "https://github.com/ChromeDevTools/chrome-devtools-mcp/blob/9cf47a44558dd6873a2bb011d2cda73aca117833/skills/chrome-devtools-cli/SKILL.md",
    "https://github.com/ChromeDevTools/chrome-devtools-mcp/blob/9cf47a44558dd6873a2bb011d2cda73aca117833/docs/tool-reference.md"
  ],
  "rank": 0.98035,
  "judge": {
    "publish": true,
    "judge_model": "codex-cli/gpt-6-luna+typesafe/jev-1.13.0",
    "prompt_version": "extract-v7+enrich-v2+judge-v2x3+jev-publish-v1"
  },
  "review_state": "approved",
  "provenance": {
    "run_id": "daily-20261015-20",
    "verdict_id": "daily-20261015-20:daily-20261015-20-0fad988eee015972-14:gate",
    "evidence_hash": "f4ab448bcf93bfbc244c11495c3319bca957c64c1a6b2148d3c22048468b33a0"
  },
  "review": {
    "draft_hash": "938cd7cbce6a74a318bfc41a3dc11c3fb21198fe83ec445fc0fdbe55262c39d6",
    "reviewer": "publication-gate",
    "reviewed_at": "2026-10-15T14:01:41.000Z",
    "decision": "daily-20261015-20:gate",
    "reason": "3 of 3 judge runs approved with p_yes >= 0.9 (mean 0.98 >= 0.9; 2 needed) and Jev gave 0.83 (>= 0.6 needed)."
  }
}
