chrome_evaluate
Execute JavaScript in an active Chrome tab, optionally targeting by URL or title, and retrieve JSON-serializable results for page inspection or automation.
Instructions
Evaluate JavaScript in an existing Chrome tab. Runs in the page context and returns JSON-serializable 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": "chrome_evaluate"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| targetId | No | Chrome tab id to target. | |
| background | No | If true, avoid explicit Chrome focus/tab activation (default). Pass false to allow foreground work. | |
| expression | Yes | ||
| urlIncludes | No | Match the target tab by URL substring. | |
| awaitPromise | No | Await a returned promise (default true). | |
| titleIncludes | No | Match the target tab by title substring. |