Skip to main content
Glama
playwright-ui-mcp

playwright-ui-mcp

by ailabs-393

browser_wait_for

Waits for a page element to appear by CSS selector, with a configurable timeout to prevent premature UI interactions.

Instructions

Wait for an element to appear on the page

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

Input Schema

NameRequiredDescriptionDefault
pageIdYesThe page ID
timeoutNoTimeout in milliseconds (default: 30000)
selectorYesCSS selector to wait for

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv1.0.0

TDQS

B3.1/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, yet it omits the most important trait for a wait tool: what happens on timeout (error, false return, or silent continue) and whether the call blocks. It also does not say whether it polls the DOM or resolves immediately if the element already exists.

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, and the core purpose is immediately clear. It may be slightly under-specified rather than verbose, but nothing needs trimming.

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?

For a tool with no annotations, no output schema, and a failure mode (timeout) that materially affects calling code, the description is too thin. An agent cannot tell how a timeout surfaces or what it receives on success, so it must guess or experiment.

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 100%, so pageId, selector, and timeout are already documented in the schema, including the 30000ms default. The description adds no meaning beyond that, which is the expected baseline when the schema does the work.

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 ('Wait for') and resource ('an element to appear on the page'), which is distinct from siblings like browser_get_visible_elements or browser_click that act immediately. However, it does not name or contrast with any sibling, so differentiation is left to the agent.

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?

Usage is only implied: an agent can infer it is used before interacting with elements that may not yet be rendered. There is no explicit statement of when to prefer this over polling with browser_get_visible_elements, nor any note about required page state or that the page must already be open.

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