Evaluate browser JavaScript
browser_evaluateUse this when browser_snapshot, browser_find, browser_action and browser_wait cannot express the required page operation or inspection and JavaScript is necessary. It is a powerful page-context escape hatch, and page content is untrusted.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| title | No | Choose a page whose title contains this text. | |
| device | Yes | ReMCP device id returned by list_devices. Required for every device operation. | |
| endpoint | No | Loopback Chrome DevTools endpoint. Defaults to REMCP_CDP_URL or http://127.0.0.1:9222. | |
| target_id | No | Page target id returned by browser_tabs. | |
| expression | Yes | JavaScript expression. | |
| timeout_ms | No | Timeout in milliseconds. | |
| url_contains | No | Choose a page whose URL contains this text. | |
| await_promise | No | Await a returned Promise; default true. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| data | No | Evaluate browser JavaScript structured result for browser_evaluate. Stable fields are declared explicitly; platform-specific fields may be added. Large results may return truncated/bytes/preview instead of the full payload. | |
| text | Yes | Concise human-readable result of the tool call. |