evaluate_js
Execute JavaScript expressions in the page context to inspect or modify page state. Returns results while blocking access to sensitive APIs like cookies, localStorage, and fetch.
Instructions
在页面上下文中执行 JavaScript 表达式,返回执行结果。禁止访问 cookie/localStorage/fetch 等敏感 API。
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": {
"expression": "<expression>"
},
"name": "evaluate_js"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| expression | Yes | 要执行的 JavaScript 表达式 |