Skip to main content
Glama

Wait in GPM Browser

gpm_browser_wait

Waits for a page element to reach a visible, hidden, attached, or detached state, for the URL to contain a string, or for a fixed delay before the next browser automation step.

Instructions

Chờ phần tử theo selector (visible/hidden/attached/detached), chờ URL chứa chuỗi, hoặc chờ một khoảng ms.

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

Input Schema

NameRequiredDescriptionDefault
msNoChờ cố định số mili-giây (tối đa 30000)
stateNoTrạng thái của selector (mặc định visible)
selectorNoSelector cần chờ
profile_idNoID của profile GPM đang kết nối CDP (có thể bỏ trống nếu chỉ có 1 profile đang kết nối)
timeout_msNoTimeout mili-giây (mặc định 15000)
url_containsNoChờ tới khi URL hiện tại chứa chuỗi này

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv1.0.0

TDQS

B3.4/5.0
Behavior3/5

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

With no annotations at all, the description must carry the full behavioral burden. It does communicate that this is a blocking wait that returns once the condition is met, which is useful context beyond the schema, but it never states what happens on timeout (throw vs return false), whether the call is side-effect free, or that the default state is visible — all of which matter for a wait primitive.

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 sentence that front-loads the element case and lists the alternatives compactly with zero filler. It is well structured, though the terseness leaves behavioral gaps that a few more words could have closed.

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?

Six optional parameters, no output schema and no annotations mean the definition has to explain both the return contract and failure behavior, and it explains neither. For a wait tool the outcome on timeout and the meaning of a successful return are the key facts an agent needs, and they are absent.

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 every parameter already carries its own documentation including defaults and min/max bounds. The description only restates the three mutually exclusive mode groups and adds no syntax, format, or interaction guidance beyond the schema, so the baseline of 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?

The description names the specific verb (wait) and enumerates the three wait modes: element state via selector, URL substring, and fixed milliseconds. That maps cleanly onto the schema's selector/state, url_contains and ms properties, so an agent can tell this apart from gpm_browser_click or gpm_browser_navigate. It stops short of explicitly contrasting itself with any sibling.

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: the three modes are listed, but nothing says when to prefer a selector wait over a fixed ms sleep, or that url_contains is the right choice after navigation. There are no prerequisites (e.g. that a CDP profile must be connected) and no exclusions.

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