Skip to content

docs: clarify evaluate_script guardrails#1902

Closed
MukundaKatta wants to merge 2 commits intoChromeDevTools:mainfrom
MukundaKatta:codex/chrome-evaluate-script-guardrails
Closed

docs: clarify evaluate_script guardrails#1902
MukundaKatta wants to merge 2 commits intoChromeDevTools:mainfrom
MukundaKatta:codex/chrome-evaluate-script-guardrails

Conversation

@MukundaKatta
Copy link
Copy Markdown
Contributor

Summary:

  • expand evaluate_script guidance to explain that it runs in the current page or frame only
  • document that snapshot uids are MCP references, not DOM attributes for querySelector
  • warn against library-specific pseudo-classes and navigation via window.location inside evaluate_script
  • regenerate the published tool reference and CLI definitions

Testing:

  • npm run gen
  • npm run build

Fixes #1895
Fixes #1894
Fixes #1892

@zyzyzyryxy
Copy link
Copy Markdown
Contributor

Thank you for your contribution!

I'll run on those changes to see what difference they make. This may take a few days, so please be patient.

@MukundaKatta
Copy link
Copy Markdown
Contributor Author

The two failing jobs (macos-latest/node-23 + windows-latest/node-20) are from the daemon-socket tests hitting ENOENT /tmp/chrome-devtools-mcp-501.sock. This PR only touches docs + tools/script.ts — the failures are unrelated to the diff. Pushed an empty retrigger commit; all other 10 matrix jobs passed on the previous run.

@MukundaKatta
Copy link
Copy Markdown
Contributor Author

Withdrawing — low-value drive-by. Apologies for the noise.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment