safari_evaluate
Run JavaScript code on the active Safari page. Automatically falls back to AppleScript when Content Security Policy blocks execution.
Instructions
Execute JavaScript in the current page. Automatically falls back to AppleScript when CSP blocks execution (e.g. Google Search Console, LinkedIn). For reading data, prefer safari_read_page or safari_snapshot. For interactions, prefer safari_click/fill with refs.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| script | Yes | JavaScript code to execute |