evaluate
Run JavaScript in the browser page for calculations, style mutations, shadow DOM access, in-page fetch, or app-specific side effects. Use explicit returns or ternaries to obtain results.
Instructions
Run JavaScript in the page. Good uses: computation, style mutations (.style.X = ..., classList), shadow-root traversal, in-page fetch(), app-specific side effects no dedicated tool covers. Scope is shared between calls; top-level const/let/class are wrapped in an IIFE. If/else blocks may return undefined — use a ternary or an explicit return.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| expression | Yes | JavaScript code to execute in the page context | |
| await_promise | No | Whether to await Promise results |