evaluate_js
Run custom JavaScript in the browser to inspect and debug page state. Use return to retrieve values for analysis.
Instructions
Execute arbitrary JavaScript in the page context. Powerful for custom inspection and debugging.
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": "evaluate_js"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| code | Yes | JavaScript code to execute. Use "return" to return values. |