Skip to main content
Glama

Wait For Element

WaitForElement
Read-only

Waits for a UI element to appear, handling dynamic content. Returns element details when found or an error on timeout. Accepts text, class, resource ID, or description as identifiers.

Instructions

Wait for an element to appear on screen. Use this instead of Wait when content is loading dynamically. Returns element info when found or error on timeout.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
textNo
timeoutNo
classNameNo
resourceIdNo
descriptionNo
Behavior4/5

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

The description discloses that the tool returns element info on success or error on timeout, adding behavioral context beyond the readOnlyHint annotation. It doesn't contradict annotations and explains dynamic loading behavior.

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?

The description is three sentences long, front-loads the core purpose, and contains no irrelevant information. Every sentence adds value.

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?

Given the tool has 5 parameters, no output schema, and zero parameter descriptions, the description is insufficiently complete. It explains when to use and what happens on success/failure but does not cover how to specify the element or what 'element info' includes.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters2/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

The input schema has 5 parameters with zero schema descriptions, and the tool description provides no insight into their meaning or usage. The description doesn't clarify how parameters like text, className, or resourceId identify the element, leaving the agent guessing.

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 waits for an element to appear on screen, using a specific verb and resource. It distinguishes itself from the sibling 'Wait' by specifying dynamic loading context.

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?

The description explicitly recommends using this tool over 'Wait' when content loads dynamically, providing clear usage context. However, it does not mention when not to use it or list alternatives beyond Wait.

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/CursorTouch/Android-MCP'

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