evaluate
Run JavaScript in the current Chrome page and return the last expression's value as text or JSON, including top-level await, multi-statement scripts, and DevTools $ / $$ helpers.
Instructions
Run JavaScript in the page and return the result as text (objects as JSON). Supports top-level await, several statements, and the DevTools console helpers $ and $$. Stops after 30 s.
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": "evaluate"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| expression | Yes | JavaScript to evaluate; the value of the last expression is returned |