browser_run_action
Execute self-contained JavaScript action objects in the live page via CDP with custom parameters, bypassing CSP restrictions and returning results directly.
Instructions
Run a self-contained JavaScript action object in the page context via CDP. The code must be an expression that evaluates to an object with an execute(params) method. Returns the action result directly. Bypasses CSP restrictions.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| code | Yes | JavaScript expression that evaluates to an action object with an execute(params) function. E.g. ({ name: "my-action", execute: function(p) { return { content: [{ type: "text", text: document.title }] }; } }) | |
| actionParams | No | Parameters to pass to the action execute() function |