browser_evaluate
Run custom JavaScript code within the current page and capture the result, enabling dynamic interactions and data extraction for browser automation.
Instructions
在页面中执行自定义 JavaScript 代码,返回结果。
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": {
"code": "<code>"
},
"name": "browser_evaluate"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| code | Yes | 要执行的 JS 代码 |