Skip to main content
Glama

browser_tab_state

Read-only

Inspect a tab's indexed DOM and accessibility tree, and capture live background screenshots via CDP even when the window is minimized or occluded, without Screen Recording permission.

Instructions

Inspect a browser tab's indexed DOM/Accessibility tree ([1], [2], ...) and/or capture a live background JPEG screenshot via CDP (works even when minimized or occluded, with zero Screen Recording permission required).

Tool call template

This tool declares no required parameters. Add optional parameters from the input schema as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {},
    "name": "browser_tab_state"
  }
}

Input Schema

NameRequiredDescriptionDefault
tab_idNoTab ID (e.g. 'tab-1' or 'safari:w1:t1') from browser_list / browser_open_tab.
tab_urlNoAlternative: match an open controllable tab by URL.
browser_idNoOptional browser filter when matching by tab_url.
disable_diffNoReturn the full DOM/AX tree instead of a diff.
include_cursorNoKeep the in-tab virtual cursor & highlight visible in the captured screenshot (default false so screenshots stay clean).
screenshot_onlyNoReturn only the screenshot (resets AX diff baseline).
include_screenshotNoInclude live CDP JPEG screenshot (default false).

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv3.0.0

TDQS

A3.7/5.0
Behavior4/5

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

Annotations only declare readOnlyHint=true; the description adds genuinely useful behavior: capture happens via CDP, still works when the tab is minimized or occluded, and requires zero Screen Recording permission. It does not restate the diff-baseline semantics (covered by the schema's disable_diff/screenshot_only), which is fine, but it also says nothing about capture latency or cost.

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?

A single front-loaded sentence with no filler; the parentheticals (index convention, minimized/occluded, no permission) all carry real information. It is dense but readable, with only minor stacking of clauses.

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?

Seven optional parameters, no output schema, and one annotation — the description covers both output modes and the key environmental caveat that makes it usable in the background. Slight gaps remain around the default return when called with no arguments and what the AX diff contains, though the schema covers the diff toggles.

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 coverage is 100%, so all seven parameters are already documented with good descriptions. The description adds only ambient meaning — that the tree is indexed for reference and the screenshot is a live background JPEG — which is useful framing but not parameter-level semantics beyond the schema. Baseline 3 applies.

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?

States a specific verb ('Inspect') plus two concrete resources: the indexed DOM/Accessibility tree with the [1], [2] element-reference convention, and a live CDP JPEG screenshot. It does not explicitly contrast itself with lookalike siblings such as get_state, get_window_state, or browser_tab_action, so an agent must infer the split.

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

Usage Guidelines3/5

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

'and/or' signals the two modes can be combined, and the mention of the indexed tree implies it is the precursor to acting on elements. However there is no explicit when-to-use versus when-not, no statement about which sibling to prefer for non-tab contexts, and no prerequisites.

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