browser_evaluate
Read computed styles, framework state, or list lengths by running JavaScript in the page and returning JSON. Use it for values other read tools cannot see.
Instructions
READ from the page with JavaScript and get the result as JSON.
Last, for what other tools cannot see: a computed style, a value held in a framework's state, the length of a list. Text, a heading or a price is browser_read_text's, markup browser_read_html's, a control browser_snapshot's: a script runs in the page, and they do not.
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. 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. Inside an iframe, pass the snapshot's frame.
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"expression": "<expression>"
},
"name": "browser_evaluate"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| frame | No | ||
| browser | No | Defaults to `main`; `support` is the helper beside it. | |
| expression | Yes |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| result | Yes |