Execute JavaScript
execute_javascriptRun JavaScript in an Arc browser tab and return the result. Use it to extract data or interact with page elements via the built-in A helper library.
Instructions
Run JavaScript in a tab and return the result. A bare expression, or a statement body that uses return, both work. The helper library is available as A (A.all, A.one, A.click, A.setValue, A.describe, A.visible).
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| code | Yes | JavaScript to evaluate. An expression returns its value; a statement body returns whatever it returns, or null. | |
| tab_id | No | Arc tab id from list_tabs. Omit to use this agent's current tab. A tool that changes a tab will not fall back to the tab the user is looking at, so pass this or call open_url first. |