Skip to main content
Glama
Chrome Testing MCP Server

Chrome Testing MCP Server

by prabhubng

Wait for Element

chrome_wait_for_element
Read-onlyIdempotent

Wait for a CSS selector to match an element before continuing, handling dynamic content loading. Specify a timeout and require visibility to keep automated Chrome tests reliable.

Instructions

Wait for an element to appear on the page.

Waits until a CSS selector matches an element. Useful for handling dynamic content loading.

Args:

  • selector (string): CSS selector to wait for (required)

  • timeout (number): Maximum wait time in ms (default: 10000)

  • visible (boolean): Wait for element to be visible (default: true)

Returns: Success/failure status.

Examples:

  • Wait for grid: { selector: ".dx-datagrid-content" }

  • Wait for modal: { selector: ".dx-popup-content", timeout: 5000 }

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": "chrome_wait_for_element"
  }
}

Input Schema

NameRequiredDescriptionDefault
timeoutNoMaximum wait time in milliseconds
visibleNoWait for element to be visible (default: true)
selectorYesCSS selector to wait for

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv1.0.0

TDQS

A3.5/5.0
Behavior3/5

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

Annotations already declare readOnlyHint, idempotentHint, non-destructive, and closed-world, so the safety profile is covered without description help. The description adds the timeout default of 10s, the visible-wait option, and that the call returns 'Success/failure status' rather than throwing, but it never states what happens on timeout (error vs. false) or whether a stale/hidden element counts as a match.

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?

The purpose is front-loaded in the first sentence and the examples are concrete and immediately usable. The Args section duplicates schema descriptions almost verbatim and the Returns line is thin, so a small amount of the text does not earn its place.

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?

For a simple three-parameter tool with no output schema, the description covers purpose, parameters, defaults, return nature, and two realistic examples. Only the timeout failure behavior is left ambiguous; the rest is sufficient for an agent to invoke it correctly.

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 all three parameters are already documented in the schema, including defaults and bounds (100–60000ms). The description's Args block largely restates those, though the examples do show realistic selector values and a timeout override, adding modest practical value. Baseline 3 applies when the schema carries the semantics.

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 opens with a specific verb and resource ('Wait for an element to appear on the page') and refines it to 'Waits until a CSS selector matches an element,' which is unambiguous and clearly distinct from siblings like chrome_click or chrome_navigate. It doesn't explicitly name a sibling to contrast with, which keeps it out of the top band.

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?

'Useful for handling dynamic content loading' implies the scenario (async rendering, SPAs) but gives no explicit when/when-not rules, no prerequisites, and no alternatives such as polling via chrome_execute_script. The usage context is implied rather than stated.

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