Skip to main content
Glama

Run AgentScript in a connected Chrome session

super_run_browser_script
DestructiveIdempotent

Queue 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

NameRequiredDescriptionDefault
codeYesComplete 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.
promptYesThe 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_idYesCaller-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_idYesExact 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_modelNoOptional 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_providerNoDefaults 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

NameRequiredDescriptionDefault
errorNo
successYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A4.4/5.0
Behavior5/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

Beyond the annotations, the description discloses ownership validation, request-ID deduplication, that the call returns run_id and status rather than a completed result, and that status/stop siblings are needed for follow-up. It also warns that scripts can modify external content and that optional Super providers consume credits, which materially adds to the destructive/open-world annotations.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is front-loaded with the core action and then groups operational constraints, return behavior, and provider caveats into readable sentences. It is longer than a simple tool needs, but the length is proportionate to the complexity and nearly every sentence adds relevant operational context.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness5/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given six parameters, rich annotations, complete schema descriptions, and an output schema, the description still supplies the missing operational picture: authorization expectations, idempotency, asynchronous run behavior, cancellation path, model-helper handoff, and credit implications. An agent has enough context to invoke it correctly and know what to do next.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 100%, so the schema already explains prompt, code, request_id, session_id, function_model, and model_provider in detail. The description reinforces the source of session_id and helper contract, but mostly repeats schema-level meaning rather than adding substantial new parameter semantics.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

The first sentence gives a specific verb and resource: queue an assistant-supplied JavaScript AgentScript for execution by a connected Chrome session owned by the authenticated account. It clearly distinguishes this from sibling tools by naming super_browser_script_context and super_browser_agent_sessions for setup inputs.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines4/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description tells the agent to use the helper contract from super_browser_script_context and a session_id from super_browser_agent_sessions, and it directs follow-up inspection to super_browser_agent_status and cancellation to super_stop_browser_agent. It also restricts use to the user's authorized task and requires confirmation for consequential actions outside that scope, though it does not explicitly contrast this tool with every possible authoring alternative.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Try in Browser

Glama MCP Gateway

Add one secure layer between your agents and this server.

Resources