chrome_evaluate
Executes JavaScript in a running Chrome tab to read or modify page state; supports promise awaiting and returning values for browser automation.
Instructions
Execute JavaScript in the page context
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": "chrome_evaluate"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| tabId | No | ||
| expression | Yes | JavaScript expression to evaluate | |
| awaitPromise | No | Wait for promise to resolve (default: true) | |
| returnByValue | No | Return result by value (default: true) |