evaluate_isolated
Execute JavaScript in a sandboxed environment to perform async operations, DOM queries, and data extraction without interfering with page scripts or state.
Instructions
Execute JavaScript in an ISOLATED context (sandboxed, separate from page scripts).
USE THIS TOOL WHEN YOU NEED TO:
Make async operations (fetch, setTimeout, Promises)
Query/manipulate the DOM without affecting page state
Run code that shouldn't interfere with page scripts
Perform async data extraction or waiting
LIMITATIONS:
CANNOT access window globals (window.NUXT, etc. will be undefined)
CANNOT call functions defined by page scripts
Only has access to DOM and standard browser APIs
EXAMPLES:
"await fetch('/api/data').then(r => r.json())" → Make API calls
"document.querySelectorAll('.item').length" → Count elements
"await new Promise(r => setTimeout(r, 1000))" → Wait/delay
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| pageId | No | Page ID (uses active page if not specified) | |
| script | Yes | JavaScript code (async/await allowed). Returns the expression result. |