Skip to main content
Glama
obra

superpowers-chrome

by obra

use_browser

Control a persistent Chrome browser to navigate, click, type, and capture page screenshots, markdown, and DOM automatically.

Instructions

Control persistent Chrome browser with automatic page capture.

Every DOM action (navigate, click, type, select, eval) auto-captures to the session dir:

  • {prefix}.png — viewport screenshot

  • {prefix}.md — page content as structured markdown

  • {prefix}.html — full rendered DOM

  • {prefix}-console.txt — browser console messages

Prefer reading these files to using 'extract' or 'screenshot' whenever possible. Actions on a page showing token-shaped content (Slack/GitHub/1Password tokens, otpauth:// URIs) or any data-sen-secret element write no capture files, token-shaped values are redacted from all output, and eval refuses outright while any data-sen-secret element is on the page — an accident guard against a cooperating agent's own reads, not a security boundary. A secret with no distinctive shape (bare TOTP seed, backup code) is captured like any other text until it is marked: mark it with 'set_attr' name 'data-sen-secret' as soon as the action that revealed it returns, before any other action on that page. Capture files written before the mark keep the value and are not deleted, so don't read them back. 'set_attr' is a write-only setter for exactly 'data-sen-nonce' or 'data-sen-secret' that is exempt from that eval restriction (see 'help' for details) — use it, not eval, to write onto the page while a secret is present.

Schema: 4 parameters — action, selector (CSS/XPath or null), payload (string or object), timeout (ms). selector targets a DOM element (null/omit for navigation, eval, tab management, etc.). payload is a string for simple actions (navigate=URL, type=text, eval=JS, keyboard_press=key). payload is an object for structured actions (set_viewport={width,height}, drag_drop={target}, etc.) — a JSON-encoded string of the same object works too. Tabs are tracked as sticky state; use switch_tab to change the active tab. Use action='help' for full per-action payload shapes.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
actionYesAction to perform. action='help' lists all actions with payload shapes.
payloadNoExtra data for the action. Both a plain object and an equivalent JSON-encoded string are accepted for every structured shape below (e.g. set_viewport accepts either {width:390,height:844} or '{"width":390,"height":844}'). Literal string for code/free-text actions, taken as-is and never JSON-parsed even if it happens to look like JSON (eval=JS source, type=literal text, await_text=literal text to wait for, select=literal option value). String or object for simple cases (navigate=URL, set_profile=name, new_tab=URL, attr=attribute name or {selector,attr}). Structured object (or its JSON-string equivalent) for the rest: set_viewport={width,height,mobile?} (no bare-string form), keyboard_press=key string or {key,modifiers:{shift?,ctrl?,alt?,meta?}}, extract=format string or {format:'text'|'html'|'markdown',selector?}, screenshot=path string or {path,fullpage?,selector?}, scroll=direction string or {deltaX?,deltaY?,selector?}, drag_drop=target selector string, {x,y} target coords, or {source,target}, mouse_move={x,y,steps?,fromX?,fromY?} (no bare-string form), file_upload=path string, JSON array-of-paths string, or {selector,files:[...]}, get_console_messages={since:epochMs} or a bare epoch-ms timestamp, switch_tab=tab index/url-substring/title-substring). See action='help' for per-action payload shapes.
timeoutNoTimeout in ms for await_element / await_text actions.
selectorNoCSS or XPath selector — what to act on. Null/omitted for actions that don't target an element (navigate, eval, list_tabs, etc.). XPath must start with / or //. dialog::accept and dialog::dismiss are special selectors for handling open dialogs.
tab_indexNoLegacy: behaves like switch_tab. Sets the active tab to this index before running the action. Prefer the switch_tab action.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changedv3.0.8
    • changedInput schema / properties / action / enum
      Previous value: -[
      -  "navigate",
      -  "back",
      -  "forward",
      -  "click",
      -  "type",
      -  "extract",
      -  "screenshot",
      -  "eval",
      -  "select",
      -  "attr",
      -  "await_element",
      -  "await_text",
      -  "new_tab",
      -  "close_tab",
      -  "list_tabs",
      -  "switch_tab",
      -  "show_browser",
      -  "hide_browser",
      -  "browser_mode",
      -  "set_profile",
      -  "get_profile",
      -  "help",
      -  "hover",
      -  "drag_drop",
      -  "mouse_move",
      -  "scroll",
      -  "double_click",
      -  "right_click",
      -  "file_upload",
      -  "keyboard_press",
      -  "set_viewport",
      -  "clear_viewport",
      -  "get_viewport",
      -  "clear_cookies",
      -  "enable_console_logging",
      -  "get_console_messages",
      -  "clear_console_messages",
      -  "kill_chrome",
      -  "restart_chrome"
      -]New value: +[
      +  "navigate",
      +  "back",
      +  "forward",
      +  "click",
      +  "type",
      +  "extract",
      +  "screenshot",
      +  "eval",
      +  "select",
      +  "attr",
      +  "set_attr",
      +  "await_element",
      +  "await_text",
      +  "new_tab",
      +  "close_tab",
      +  "list_tabs",
      +  "switch_tab",
      +  "show_browser",
      +  "hide_browser",
      +  "browser_mode",
      +  "set_profile",
      +  "get_profile",
      +  "help",
      +  "hover",
      +  "drag_drop",
      +  "mouse_move",
      +  "scroll",
      +  "double_click",
      +  "right_click",
      +  "file_upload",
      +  "keyboard_press",
      +  "set_viewport",
      +  "clear_viewport",
      +  "get_viewport",
      +  "clear_cookies",
      +  "enable_console_logging",
      +  "get_console_messages",
      +  "clear_console_messages",
      +  "kill_chrome",
      +  "restart_chrome"
      +]
  2. Changed1 schema field changedv3.0.4
    • changedInput schema / properties / payload / description
      Previous value: -"Extra data for the action. String for simple cases (navigate=URL, type=text, eval=JS, keyboard_press=key, set_profile=name, new_tab=URL). Object for structured cases (set_viewport={width,height,mobile?}, keyboard_press={key,modifiers:{shift?,ctrl?,alt?,meta?}}, extract={format:'text'|'html'|'markdown'}, screenshot={path?,fullpage?}, scroll={deltaX?,deltaY?} or direction string, drag_drop={x,y} or selector string for target, mouse_move={x,y,steps?,fromX?,fromY?}, file_upload={files:[...]}, get_console_messages={since:epochMs}, await_text=text string or {text,timeout?}, switch_tab=tab index/url-substring/title-substring). See action='help' for per-action payload shapes."New value: +"Extra data for the action. Both a plain object and an equivalent JSON-encoded string are accepted for every structured shape below (e.g. set_viewport accepts either {width:390,height:844} or '{\"width\":390,\"height\":844}'). Literal string for code/free-text actions, taken as-is and never JSON-parsed even if it happens to look like JSON (eval=JS source, type=literal text, await_text=literal text to wait for, select=literal option value). String or object for simple cases (navigate=URL, set_profile=name, new_tab=URL, attr=attribute name or {selector,attr}). Structured object (or its JSON-string equivalent) for the rest: set_viewport={width,height,mobile?} (no bare-string form), keyboard_press=key string or {key,modifiers:{shift?,ctrl?,alt?,meta?}}, extract=format string or {format:'text'|'html'|'markdown',selector?}, screenshot=path string or {path,fullpage?,selector?}, scroll=direction string or {deltaX?,deltaY?,selector?}, drag_drop=target selector string, {x,y} target coords, or {source,target}, mouse_move={x,y,steps?,fromX?,fromY?} (no bare-string form), file_upload=path string, JSON array-of-paths string, or {selector,files:[...]}, get_console_messages={since:epochMs} or a bare epoch-ms timestamp, switch_tab=tab index/url-substring/title-substring). See action='help' for per-action payload shapes."
  3. First observedv3.0.1

TDQS

A4.5/5.0
Behavior5/5

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

Annotations cover only the generic hints (readOnly=false, openWorld=true, idempotent=false, destructive=false); the description adds far more: every DOM action auto-writes .png/.md/.html/-console.txt artifacts, secret-shaped content suppresses captures and redacts output, eval refuses outright when a data-sen-secret element is present, set_attr is a write-only setter exempt from that restriction, and pre-mark capture files are retained and must not be re-read. This is exactly the behavioral context annotations cannot express.

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?

Front-loaded (purpose → capture artifacts → secret guardrails → parameters) and every block carries information an agent needs. The secret-handling paragraph is dense and reads as run-on prose, which costs some clarity, but little of the text is pure filler given the tool's complexity.

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

Completeness4/5

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

For a 38-action tool with five parameters and no output schema, the description covers the safety profile, capture side effects, the sticky-tab model, and defers per-action payload shapes to action='help' — a legitimate escape hatch rather than an omission. The only residual gap is that the destructive-looking actions (kill_chrome, clear_cookies, restart_chrome) are not called out against the destructive=false hint.

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

Parameters4/5

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

Schema coverage is 100%, so the baseline is 3, but the description goes beyond it: it explains selector nullability by action class, distinguishes literal-string payloads (never JSON-parsed) from structured object payloads, gives concrete shape examples (set_viewport={width,height}, drag_drop={target}, keyboard_press={key,modifiers}), and clarifies that a JSON-encoded string is accepted for every structured shape. That is real added meaning over the schema.

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?

Opens with a specific verb+resource: 'Control persistent Chrome browser with automatic page capture.' The automatic-capture behavior is a distinguishing characteristic stated up front, and the enumerated action set (navigate, click, type, eval) confirms the scope. An agent immediately knows what class of tool this is.

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?

Gives explicit routing advice — 'Prefer reading these files to using extract or screenshot whenever possible' — and names the alternative actions to avoid. It also directs the agent to action='help' for payload shapes and instructs 'use it [set_attr], not eval' under a specific condition. What's missing is higher-level when/when-not framing across the many actions, but the actionable preferences are present.

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

Deploy Server

Other Tools