Skip to main content
Glama

browser_wait

Waits read-only for a specified condition in an open browser tab, such as element visibility, text, value, URL, or network idle, and returns the last state on timeout.

Instructions

Read-only wait for condition. State uses native properties/ARIA; missing state is unavailable, not false. Role absence need not mean DOM removal. Prefer a result/status container for text; compares full text, reports a bounded preview with length/truncation. Timeout reports last state; field values are omitted.

Input Schema

NameRequiredDescriptionDefault
nthNoSelector only: zero-based DOM index, AX tree order for role.
nameNorole only: exact AX name; empty allowed.
frameNoChild frame: at least one of url/title/path. url/title exact; path=unique nested CSS iframe steps (e.g. ["#frame"]); exclusive with frame_id.
idle_msNonetwork_idle quiet interval.
expectedNoRequired for url (substring), value (exact), checked/selected/expanded (boolean; checked also "mixed"). text: expected substring XOR previous. Omit otherwise.
frame_idNo
previousNotext only: complete prior innerText, not a truncated preview; exclusive with expected. Change does not establish new-run completion.
selectorNoQuery by selector_type; role example: selector="link", name="Claim".
conditionYesElement conditions require selector; url/network_idle forbid locator fields.
tab_handleYes
timeout_msNo
dialog_policyNoaccept/dismiss auto-handle dialogs and return their messages.ask
selector_typeNoDefault css. label: exact associated HTML label, whitespace normalized. placeholder: exact attribute.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changedv0.25.2
    • changedInput schema / properties / previous / description
      Previous value: -"text only: wait for full rendered innerText to change; exclusive with expected."New value: +"text only: complete prior innerText, not a truncated preview; exclusive with expected. Change does not establish new-run completion."
  2. Changed10 schema fields changedv0.24.2
    • addedInput schema / properties / condition / description
      Added value: +"Element conditions require selector; url/network_idle forbid locator fields."
    • changedInput schema / properties / dialog_policy / description
      Previous value: -"accept/dismiss returns handled dialog messages."New value: +"accept/dismiss auto-handle dialogs and return their messages."
    • changedInput schema / properties / expected / description
      Previous value: -"text/url: substring; value: exact string; checked/selected/expanded: boolean (checked also accepts \"mixed\")."New value: +"Required for url (substring), value (exact), checked/selected/expanded (boolean; checked also \"mixed\"). text: expected substring XOR previous. Omit otherwise."
    • changedInput schema / properties / frame / description
      Previous value: -"Exact child-frame URL/title or CSS iframe path (e.g. [\"#content_iframe\"]); alternative to frame_id. Each path entry uniquely selects an iframe in the preceding document."New value: +"Child frame: at least one of url/title/path. url/title exact; path=unique nested CSS iframe steps (e.g. [\"#frame\"]); exclusive with frame_id."
    • addedInput schema / properties / idle_ms / description
      Added value: +"network_idle quiet interval."
    • changedInput schema / properties / name / description
      Previous value: -"role only: exact accessible name; may be empty."New value: +"role only: exact AX name; empty allowed."
    • changedInput schema / properties / nth / description
      Previous value: -"Zero-based match index: DOM order, or AX tree order for role."New value: +"Selector only: zero-based DOM index, AX tree order for role."
    • changedInput schema / properties / previous / description
      Previous value: -"Text only: wait for full rendered innerText to differ; alternative to expected."New value: +"text only: wait for full rendered innerText to change; exclusive with expected."
    • changedInput schema / properties / selector / description
      Previous value: -"CSS/XPath query, HTML label text, exact placeholder or AX role (e.g. selector=\"link\", name=\"Claim\"), according to selector_type."New value: +"Query by selector_type; role example: selector=\"link\", name=\"Claim\"."
    • changedInput schema / properties / selector_type / description
      Previous value: -"Default css. label matches associated HTML labels with whitespace normalized; role uses browser AX semantics."New value: +"Default css. label: exact associated HTML label, whitespace normalized. placeholder: exact attribute."
  3. Changed1 schema field changedv0.24.1
    • changedInput schema / properties / selector / description
      Previous value: -"CSS/XPath query, HTML label text, exact placeholder or AX role, according to selector_type."New value: +"CSS/XPath query, HTML label text, exact placeholder or AX role (e.g. selector=\"link\", name=\"Claim\"), according to selector_type."
  4. First observedv0.24.0

TDQS

A3.7/5.0
Behavior4/5

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

With no annotations provided, the description carries the behavioral burden well: it declares read-only behavior, explains missing state semantics, warns about role absence not implying DOM removal, and describes text comparison, preview truncation, and timeout reporting.

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

Conciseness5/5

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

The description is compact and front-loaded with the core purpose, followed by dense but relevant behavioral caveats. Every sentence contributes to correct invocation or interpretation.

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

Completeness3/5

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

For a 13-parameter tool with no output schema and no annotations, the description covers important caveats but still leaves gaps around normal success return values and how different condition outcomes are reported. It is adequate but not fully complete for the tool's complexity.

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 high at 77%, so the schema already documents most parameters. The description adds useful behavioral context around text comparison and timeout results, but does not significantly enrich parameter usage beyond what the schema already states.

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: 'Read-only wait for condition.' This clearly distinguishes browser_wait from action-oriented siblings such as browser_click or browser_fill, though it does not explicitly mention alternatives.

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?

It gives useful implied guidance, such as preferring a result/status container for text, but does not explicitly state when to use browser_wait instead of browser_read_text, browser_snapshot, or polling via browser_evaluate.

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