browser_eval
Run arbitrary JavaScript in the page context to extract DOM data or probe JS state, returning JSON-serializable results for security testing.
Instructions
Purpose: Run arbitrary JavaScript in the page context and return the result. Use for custom DOM extraction, probing JS state… Constraints: The JS is written to a workspace temp file and evaluated to avoid quoting issues. Return a JSON-serializable value (wrap objects in JSON.stringify) for clean output.… Example: browser_eval(js="JSON.stringify({wd: navigator.webdriver, plugins: navigator.plugins.length})"…
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": {
"js": "<js>"
},
"name": "browser_eval"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| js | Yes | ||
| session | No | default |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||