tb_executeScript
Run a JavaScript snippet in the active browser page and return its value. Pass arguments positionally and use return to send results back to your agent.
Instructions
Execute a JavaScript snippet in the active page and return its result. The script body is wrapped as a function — use return to send a value back. Args are passed positionally via arguments[0], arguments[1], ...
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": {
"sessionId": "<sessionId>",
"script": "<script>"
},
"name": "tb_executeScript"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| args | No | Positional arguments accessible as arguments[N] | |
| script | Yes | JS body, e.g. 'return document.title' | |
| sessionId | Yes | Session ID from tb_openBrowser |