browser_eval
Execute JavaScript expressions in the browser page to access DOM, storage, or make requests, returning the result.
Instructions
在页面执行 JS 表达式(=F12 控制台输入,如 document.title / JSON.stringify({...}) / 1+1 / location.href),返回结果。传表达式,不是箭头函数。可读 DOM/storage/发请求。
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_eval"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| code | Yes | 要执行的 JS 表达式/语句 |