Skip to main content
Glama

browser_wait

Pause automation until an element or text is visible on the page, using CSS or text selectors to confirm a match can be seen before the next action.

Instructions

Wait for an element or a text to be visible on the page. Supports CSS and text-based selectors. found is true only for a match that can be seen: one that is display:none, visibility:hidden, opacity 0 (itself or a parent), smaller than 2 px, inside a closed box, or moved outside the page does not count, and the page is not scrolled. If only such matches exist when the time is up, the answer is found:false with on_page_but_hidden:true. Pass state: "attached" to wait only for the match to exist; visible then says whether it can be seen - for example a hidden file input (input[type=file]) before browser_upload_file, an , or a hidden token field. A fixed element counts only inside the window. With a Chrome extension older than 1.33 (the Chrome Web Store may still serve one) visibility is not checked: a default wait answers found:true with visible:"unknown" and visibility_checked:false, so check the element before you act on it; with state "attached" the answer has no visible field.

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": {
      "selector": "<selector>"
    },
    "name": "browser_wait"
  }
}

Input Schema

NameRequiredDescriptionDefault
stateNovisible (default): wait until a match can be seen (with an extension older than 1.33: until it exists, see visible in the answer). attached: wait until a match exists on the page, seen or not.
timeoutNoMax wait time in ms (default: 10000, at most 60000)
selectorYesCSS selector or text selector (e.g. "text=Success", "button:text(Next)") to wait for
partitionNoRun this call in a partition from browser_partition (an id like "p1"). Leave it out for the default partition. An unknown or closed id is an error; the call is never sent to the default partition instead.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed3 schema fields changedv1.33.0
    • addedInput schema / properties / partition
      Added value: +{
      +  "description": "Run this call in a partition from browser_partition (an id like \"p1\"). Leave it out for the default partition. An unknown or closed id is an error; the call is never sent to the default partition instead.",
      +  "type": "string"
      +}
    • addedInput schema / properties / state
      Added value: +{
      +  "description": "visible (default): wait until a match can be seen (with an extension older than 1.33: until it exists, see visible in the answer). attached: wait until a match exists on the page, seen or not.",
      +  "enum": [
      +    "visible",
      +    "attached"
      +  ],
      +  "type": "string"
      +}
    • changedInput schema / properties / timeout / description
      Previous value: -"Max wait time in ms (default: 10000)"New value: +"Max wait time in ms (default: 10000, at most 60000)"
  2. First observedv1.0.0

TDQS

A4.3/5.0
Behavior5/5

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

With no annotations, the description carries the full burden and does so thoroughly: it enumerates what disqualifies a match (display:none, visibility:hidden, opacity 0 including parents, sub-2px, closed boxes, off-page, unscrolled page) and defines found:false with on_page_but_hidden:true as the fallback. It also discloses a version-dependent degradation (extension older than 1.33 returns visible:"unknown" and visibility_checked:false) and the fixed-element-inside-window rule, which are exactly the behavioral caveats an agent needs before acting on a result.

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?

Content is front-loaded: purpose first, then the visibility contract, then the attached-mode guidance, then the version caveat. It is dense and a few sentences are long run-ons with stacked clauses, but no sentence is filler given there is no output schema to carry the return semantics.

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?

No output schema exists, so the description must define return fields, and it does: found, on_page_but_hidden, visible, and visibility_checked, including when each appears or is absent. Combined with the visibility rules and the extension-version caveat, an agent has everything needed to call it and interpret the result correctly.

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 baseline would be 3, but the description adds genuine meaning beyond the schema for state:"attached" — what visible reports in that mode, what the answer omits, and the older-extension variant where visible is absent. Selector and timeout are left to the schema, which is reasonable given their full descriptions.

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 first sentence states a specific verb and resource: wait for an element or text to become visible, with CSS and text selectors. An agent can immediately tell this apart from browser_wait_for_network by resource, though no sibling is named explicitly.

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 explicitly routes between the two modes: default 'visible' waits for a perceivable match, and state:"attached" waits only for existence. It supplies concrete when-to-use cases for attached — a hidden input[type=file] before browser_upload_file, an <option>, a hidden token field — which is strong situational guidance, but it never states when not to use this tool or points to an alternative wait primitive.

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