Skip to main content
Glama

page_waitElementGone

Waits for a UI element to disappear from the page. Verifies that loading indicators, toasts, or modals have closed, returning success when gone.

Instructions

轮询等待选择器对应的元素从页面消失(最长 timeout 毫秒,每 retryInterval 毫秒重试)。何时用:验证 toast / loading / 弹窗 / 骨架屏已消失。成功返回 {selector,gone:true,waitTime}。带 selector[index=N] 时,该索引越界也算「已消失」。timeout 默认 5000ms,retryInterval 默认 200ms。等任意非元素条件(page.data 变化等)改用 mp_pollUntil。超时抛错;若轮询期间持续底层报错会提示可能是连接级故障,建议 mp_healthCheck / mp_recoverConnection。

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
timeoutNo
selectorYes
connectionNo可选连接覆盖(不传则用默认会话)。可用字段:mode(launch|connect)、cliPath、projectPath、wsEndpoint、timeout、port(【自动化端口】→ cli auto --auto-port,默认 9420;不是 IDE HTTP 服务端口,别把 IDE 服务端口传进来)、account、ticket、trustProject、args、cwd、autoClose、autoLaunch、launchTimeout、connectTimeout。
retryIntervalNo
Behavior4/5

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

With no annotations provided, the description carries the full transparency burden. It covers polling mechanism, default timeout (5000ms) and retryInterval (200ms), return format {selector,gone:true,waitTime}, index behavior, timeout error, and suggestions for connection issues. Missing details on what if element never existed, but overall transparent.

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 description is concise and front-loaded with the main purpose. It contains essential information without fluff, though it could be structured slightly better (e.g., separate lines for defaults and error handling).

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?

Given the complexity (4 params, no output schema), the description covers the key points: when to use, how it works, defaults, index behavior, error handling, and alternatives. It lacks a full return schema specification but provides the essential return fields. It also mentions the connection parameter indirectly.

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 description coverage is low (25%), so the description compensates by explaining default values for timeout and retryInterval, the meaning of the selector (with optional index=N), and the behavior of index out-of-bounds. The connection parameter is described in schema but not in description; however the description adds value for other parameters.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states the tool polls and waits for an element to disappear, with specific usage examples like toast/loading/popup/skeleton screen. It distinguishes itself from siblings like 'page_waitElement' (which waits for appearance) and 'mp_pollUntil' (for non-element conditions).

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines5/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description explicitly says when to use (verify disappearance of specific UI elements) and when not to (for non-element conditions, use 'mp_pollUntil'). It also explains special behavior with selector[index=N] where out-of-bounds counts as gone.

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

Install Server

Other Tools

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/Chaixueyuan/weapp-agent-mcp'

If you have feedback or need assistance with the MCP directory API, please join our Discord server