Skip to main content
Glama

wait_for_element_gone

Read-only

Poll the UI tree until a matching element disappears from the screen, so you can wait for loading indicators, skeletons, or dialogs to clear before proceeding.

Instructions

Poll the UI tree until an element matching the criteria disappears from screen. Useful for waiting until loading indicators, skeletons, or dialogs go away.

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

Input Schema

NameRequiredDescriptionDefault
observeNoCapture screen state after element disappears. Default: none
platformNoTarget platform. Inferred if omitted.
device_idNoDevice ID. Omit for the connected device.
text_exactNoWait for element with this exact text to disappear
timeout_msNoMaximum time to wait in ms. Default: 30000 — spinners backed by a slow request routinely outlast 10s
resource_idNoWait for element with this resource_id substring to disappear (case-insensitive)
text_containsNoWait for element with this text substring to disappear (case-insensitive)
type_containsNoFilter by element type containing this substring (case-insensitive)
poll_interval_msNoPolling interval in ms. Default: 500

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv2.0.1

TDQS

A4/5.0
Behavior3/5

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

The readOnlyHint annotation already establishes safety. The description adds the polling behavior and matching against criteria, but omits timeout failure behavior (e.g., whether it errors or returns a status) and whether the call blocks until completion. For a wait tool, these are notable gaps beyond what annotations provide.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

Two sentences with zero waste, front-loading the core behavior and following with concrete use cases; every sentence earns 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?

Given the tool's simplicity and the fact that all parameters are fully described in the schema, the description is mostly complete. However, it could mention what happens on timeout (e.g., returns an error or a boolean) to fully prepare an agent for the blocking wait.

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 parameters are fully documented in the schema. The description adds only the general notion of 'matching criteria' without elaborating on any specific parameter semantics, which is the expected baseline when the schema does the heavy lifting.

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 states a specific verb ('Poll') and resource ('UI tree') and clearly distinguishes the operation as waiting for disappearance, which contrasts with sibling tools like wait_for_element that wait for appearance.

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?

It provides clear contexts for use: waiting until loading indicators, skeletons, or dialogs go away. It does not explicitly exclude scenarios or name alternative tools, but the intended usage is clear.

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