Skip to content

feat: support evaluating scripts from local files - #2606

Open
achideal wants to merge 1 commit into
ChromeDevTools:mainfrom
achideal:feat/evaluate-script-source-path
Open

feat: support evaluating scripts from local files#2606
achideal wants to merge 1 commit into
ChromeDevTools:mainfrom
achideal:feat/evaluate-script-source-path

Conversation

@achideal

Copy link
Copy Markdown

Summary

  • extend evaluate_script with sourcePath for loading JavaScript from the MCP server filesystem
  • add format: function | script while preserving existing function calls, output redirection, and CLI positional syntax
  • validate local source paths through MCP roots and cover page, service worker, and CLI execution

Supersedes #1772.
Fixes #1775.

Test plan

  • npm run gen
  • npm run test tests/tools/script.test.ts tests/e2e/chrome-devtools-commands.test.ts
  • npm run test (feature-related tests pass; the local Windows run has unrelated existing failures: symlink creation requires additional OS privileges, one extension-page timeout, and the large full-page screenshot exceeds Chrome's limit)

@google-cla

google-cla Bot commented Aug 22, 2026

Copy link
Copy Markdown

Thanks for your pull request! It looks like this may be your first contribution to a Google open source project. Before we can look at your pull request, you'll need to sign a Contributor License Agreement (CLA).

View this failed invocation of the CLA check for more information.

For the most up to date status, view the checks section at the bottom of the pull request.

@achideal
achideal force-pushed the feat/evaluate-script-source-path branch from 948f00c to 2616476 Compare August 22, 2026 16:33
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.

Feature: Add evaluate_script_file tool to evaluate JavaScript files from the local filesystem

1 participant