browser_execute_js
Execute JavaScript in a live browser page to extract data, read computed styles, or call page APIs, returning the result directly.
Instructions
Execute JavaScript in the page context and return the result. Useful for extracting specific data, reading computed styles, or interacting with page APIs — often more precise than screenshots for getting exact values.
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_execute_js"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| expression | Yes | JavaScript expression to evaluate |