browser_evaluate
Execute a JavaScript function in a remote browser and retrieve the JSON-serializable result, enabling dynamic page interaction and data extraction.
Instructions
Evaluate a JavaScript function and return its (JSON-serializable) result.
function is a JS function expression, e.g. "() => document.title" or,
when ref is given, "(el) => el.textContent" receiving the element.
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": {
"function": "<function>"
},
"name": "browser_evaluate"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| function | Yes | ||
| session_id | No | ||
| ref | No |