run_js
Execute JavaScript in a Chrome tab and obtain the JSON-serializable result.
Instructions
Run JavaScript in a Chrome tab and return the JSON-serializable result.
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": "run_js"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| expression | Yes | JavaScript expression to evaluate. | |
| tabId | No | Optional Chrome tab id. Defaults to the first page tab. |