nex_browser_run_code
Runs page JavaScript in a browser session when runCode permission is enabled. Supports CAPTCHA-related workflows through permitted tools without bypassing browser permissions.
Instructions
Run page JavaScript when the separate runCode permission is enabled. Page CAPTCHA: default to nex_captcha_product_schema, collect real page inputs with permitted tools, then use free nex_captcha_detect with productCode/adapter. Confirm application capability before NexCaptcha buy/query and apply the result in the original page. nex_browser_captcha_prepare is optional; never bypass browser permissions.
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": "nex_browser_run_code"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| code | Yes | ||
| pageId | No | Defaults to the active page | |
| sessionId | No | Defaults to the active session |