browser_evaluate
Runs JavaScript in the page context and returns the result, letting you read window globals, DOM data, and computed values directly from the live browser page.
Instructions
在页面上下文执行 JavaScript 并返回结果(读 window 全局变量、DOM 数据等)
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": {
"script": "<script>"
},
"name": "browser_evaluate"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| script | Yes | JS 代码,如 document.title 或返回值的函数 |