Run AgentScript in a connected Chrome session
super_run_browser_scriptQueue an assistant-supplied JavaScript AgentScript for execution by a connected Chrome session owned by the authenticated account. Use the helper contract from super_browser_script_context and a session_id from super_browser_agent_sessions. Scripts can navigate, read pages, click, type, submit forms, and modify external content. Use only for the user's authorized task; obtain confirmation for consequential actions outside that scope. The server validates account/session ownership and deduplicates identical request IDs. Returns a run_id and status, not a completed result. Inspect super_browser_agent_status and use super_stop_browser_agent to cancel. This path makes no separate model call to author the script; model helpers default to a pause-and-resume handoff to this assistant; optional Super providers consume credits.
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": {
"prompt": "<prompt>",
"code": "<code>",
"session_id": "<session_id>",
"request_id": "<request_id>"
},
"name": "super_run_browser_script"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| code | Yes | Complete asynchronous JavaScript body using the documented AgentScript helpers. Use top-level await as needed and return the observed result. Do not include Markdown fences or an uncalled wrapper function. The connected extension executes this code and its browser actions. | |
| prompt | Yes | The user's requested task, permitted actions and constraints, such as research only or do not send messages. Stored with the run for inspection; the supplied code implements this task. | |
| request_id | Yes | Caller-generated idempotency key for this exact script and session. Reuse only for an identical network retry; use a new key when code, prompt, session or model changes. Claimed work is not replayed. | |
| session_id | Yes | Exact session_id returned by super_browser_agent_sessions for this authenticated account. Identifies the connected Chrome runner; do not invent an ID or use another account's session. | |
| function_model | No | Optional explicit model identifier for model-based AgentScript helpers only. Omit to use the configured function_model from super_browser_script_context. Does not select a separate script-authoring model. | |
| model_provider | No | Defaults to host: pause model helpers for the connected ChatGPT/Claude assistant to answer. openrouter uses the user key configured securely in the Super dashboard; super spends Super credits. Never select a paid provider without user intent. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| error | No | ||
| success | Yes |