Skip to main content
Glama

browser_tab_action

Control browser tabs in the background without stealing focus: click, type, scroll, navigate, upload files, inspect logs, manage cookies/storage, and wait for events.

Instructions

Operate any browser tab in the background via Extension CDP, raw CDP, or AppleEvents without stealing focus (with live 0.72x in-tab virtual cursor, click ripples, and element highlight): click, hover, move, set_value, type_text, press_key, paste (text/md/html without touching OS clipboard), select_text, perform_secondary_action, scroll, drag, goto, back, forward, reload, close, evaluate, upload_files (Two-Tier CDP + DataTransfer fallback), wait_for_download, list_downloads, get_dialog, handle_dialog, get_console_logs, get_network_requests, get_network_body, get_cookies, set_cookies, clear_cookies, get_storage, set_storage, wait_for.

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": {
      "action": "<action>"
    },
    "name": "browser_tab_action"
  }
}

Input Schema

NameRequiredDescriptionDefault
xNoViewport X coordinate.
yNoViewport Y coordinate.
keyNoKey chord for press_key/click, OR single storage key for get_storage.
urlNoTarget URL for action='goto', 'wait_for_download', 'get_cookies', or 'clear_cookies'.
nameNoCookie name filter for get_cookies / clear_cookies.
textNoText for type_text, paste, or select_text.
to_xNo
to_yNo
urlsNoURLs filter for action='get_cookies'.
clearNoClear buffer/storage for get_console_logs, get_network_requests, or set_storage.
filesNoLocal file paths for action='upload_files'.
levelNoFor get_console_logs: optional level filter ('log', 'warn', 'error', 'info', 'debug').
limitNoMax entries to return for list_downloads, get_console_logs, or get_network_requests.
pagesNo
valueNoValue for set_value.
acceptNoFor handle_dialog: true to accept/OK, false to dismiss/Cancel (default true).
actionYes
domainNoCookie domain filter for get_cookies / clear_cookies.
formatNo
from_xNo
from_yNo
methodNoFor get_network_requests: HTTP method filter (e.g. 'GET', 'POST').
prefixNo
rippleNoEmit click-style ripple ring on hover/move (default false).
statusNoFor get_network_requests: HTTP status code filter (e.g. 200, 500).
suffixNo
tab_idNoTab ID (e.g. 'tab-1' or 'safari:w1:t1').
cookiesNoCookies array ({ name, value, url?, domain?, path?, secure?, httpOnly?, sameSite?, expires? }) for set_cookies.
entriesNoKey-value map to write for set_storage.
tab_urlNoAlternative: match an open tab by URL.
selectorNoCSS selector, 'text=...', or 'role=...' target.
directionNo
browser_idNoOptional browser filter when matching by tab_url.
expressionNoJavaScript expression for action='evaluate'.
request_idNoFor get_network_body: requestId from get_network_requests.
timeout_msNoTimeout in ms for wait_for, upload_files, or wait_for_download.
url_filterNoFor get_network_requests: case-insensitive URL substring filter.
all_browserNoFor clear_cookies on non-extension CDP browsers: clear all browser cookies.
click_countNo
duration_msNo
prompt_textNoFor handle_dialog: text to enter into window.prompt().
remove_keysNoKeys to remove for set_storage.
show_cursorNoAnimate the in-tab virtual cursor & highlight overlay for this action (default true).
to_selectorNoOptional drag destination selector.
mouse_buttonNo
return_stateNoAutomatically return updated AX state diff after action (default true for mutations, false for inspection queries).
storage_typeNoFor get_storage / set_storage: 'local' or 'session' (default 'local').
element_indexNoElement index [N] from browser_tab_state.
from_selectorNoOptional drag start selector.
click_selectorNoFor wait_for_download: CSS/text selector to click to start the download.
include_cursorNoInclude virtual cursor overlay in returned screenshot (default false).
selection_typeNo
secondary_actionNoSecondary action ('ShowMenu', 'Expand', 'Collapse', 'Increment', 'Decrement').
to_element_indexNoOptional drag destination element index [N].
trigger_selectorNoFor upload_files: CSS/text selector of button that opens a file chooser dialog.
from_element_indexNoOptional drag start element index [N].
include_screenshotNoInclude updated live screenshot (default false).
click_element_indexNoFor wait_for_download: element index [N] to click to start the download.
dispatch_move_eventNoFor hover/move, dispatch mouseMoved event (default true for hover, false for move).
prefer_data_transferNoFor upload_files: force Tier-2 in-page DataTransfer File construction.
trigger_element_indexNoFor upload_files: button element index [N] that opens a file chooser dialog.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv3.0.0

TDQS

C2.8/5.0
Behavior2/5

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

With no annotations, the description carries the full behavioral burden. It does disclose useful traits: background execution without focus stealing, three transports (Extension CDP, raw CDP, AppleEvents), a 0.72x virtual cursor, click ripples, and element highlight. However, for a 31-action tool that includes destructive operations (close, clear_cookies, handle_dialog, evaluate), it never states side effects, permission or OS-access requirements, or whether cookie/storage changes are irreversible.

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

Conciseness3/5

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

The purpose is front-loaded in the first clause, which is good, but the bulk is a single 31-item parenthetical list of action names with no grouping, ordering rationale, or pairing of actions to their required parameters. It is dense rather than padded, but poorly structured for scanning.

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

Completeness2/5

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

This is a high-complexity tool: 61 parameters, 31 actions, nested cookie objects, no annotations, and no output schema. The description never explains what an action returns, which parameter combinations each action requires (selector vs. element_index vs. x/y), or the interaction between show_cursor/include_screenshot and return_state. Given the complexity, the definition is materially incomplete.

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 77%, so the schema already documents most parameters and the baseline is 3. The description adds no per-parameter meaning beyond naming the actions, and parameters such as prefix, suffix, pages, click_count, duration_ms, and to_x/to_y remain unexplained in both places, so no credit above baseline.

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

Purpose4/5

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

The description states a specific verb and resource ('Operate any browser tab in the background') and enumerates the exact action set the single `action` enum accepts, which is genuinely distinguishing. It stops short of contrasting itself with siblings like browser_tab_state or js, so an agent must infer the boundary between 'operate' and 'read state'.

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

Usage Guidelines2/5

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

There is no explicit when-to-use or when-not-to-use guidance. The phrase 'without stealing focus' hints at the niche versus foreground automation, but nothing tells the agent to prefer browser_tab_state for inspection, js for scripted flows, or cursor_control for cursor behavior. The action list implies capabilities but not selection criteria.

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