browser_evaluate
Evaluate JavaScript in a live page and return JSON, exposing computed styles, state, and list lengths invisible to other tools. Reads without changing the page, and redirects attempts to act to proper tools.
Instructions
READ from the page with JavaScript and get the result as JSON.
For what the other tools cannot see: a computed style, a value held in a framework's state, the length of a list.
Acting on the page is refused, and the refusal names the tool to use.
Assigning to value, checked or selected, or calling click(),
dispatchEvent(), submit() or requestSubmit(), changes the page without
a real keystroke or pointer, and a page can tell. Use browser_click,
browser_type or browser_select_option instead; they do the same thing
through the pointer and the keyboard. Reading any of those properties is
fine.
The refusal catches the obvious spellings, not every possible one. A script that slips past it is still the wrong way to do the thing: report it in your answer rather than using it.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| browser | No | Defaults to `main`; `support` is the helper beside it. | |
| expression | Yes |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| result | Yes |