Skip to main content
Glama
1999AZZAR

scrcpy-mcp

by 1999AZZAR

ui_wait_for_element

Read-only

Wait for a UI element to appear on an Android device screen. Polls using text, class, resource ID, or content description until match or timeout.

Instructions

Wait for a UI element to appear on screen. Polls the UI until the element matches criteria or timeout is reached.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
textNoText content to search for
serialNoDevice serial number
classNameNoClass name to match exactly
timeoutMsNoMaximum time to wait in milliseconds (default 15000)
exactMatchNoIf true, text and contentDesc require exact matches
resourceIdNoResource ID to match exactly
contentDescNoContent description to search for

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
messageYes
successYes
Behavior3/5

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

readOnlyHint=true and openWorldHint=true are already declared in annotations. The description adds that the tool 'polls' and has timeout behavior, which is useful. However, it doesn't disclose what happens on timeout (error? returns false?), what 'matches criteria' means in detail, or whether it returns the found element or a boolean. With annotations covering safety (read-only, open-world), the incremental disclosure is moderate but not rich.

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 a single efficient sentence that establishes core behavior (wait, poll, criteria, timeout) without padding. It's appropriately front-loaded with the primary action. Could potentially add a note about return/error behavior without bloating significantly, but current length is reasonable.

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?

For a 7-parameter polling tool with no required parameters and an output schema present, the description covers the basic wait-poll-timeout paradigm. However, it lacks clarity on return values (does it return the matched element or a boolean success?), multi-parameter matching semantics (AND/OR), and failure behavior on timeout. The presence of an output schema offsets some of this, but the matching criteria semantics are a genuine gap for a tool with 7 search parameters.

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 7 parameters are documented in the schema itself. The description adds minimal value beyond that: it mentions 'polls' and 'criteria' but doesn't explain how the text, className, resourceId, and contentDesc parameters combine (AND vs OR logic), or how exactMatch interacts. Baseline 3 is appropriate given full schema coverage, but the combination semantics are unaddressed.

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 states a clear purpose: 'Wait for a UI element to appear on screen' with a specific verb (wait/poll) and resource (UI element). It distinguishes well from siblings like ui_find_element (which finds without waiting) and wait (a generic sleep). However, it doesn't explicitly distinguish itself from ui_scroll_to_element or other UI-timing tools.

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?

The description implies usage for synchronization scenarios ('polls until element matches criteria or timeout is reached') but provides no explicit guidance on when to use this vs ui_find_element, wait, or scroll_to_element. No exclusions or alternatives are named. The polling behavior and timeout semantics are stated but the differentiation from siblings relies on the agent making inferential connections.

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/1999AZZAR/scrcpy-mcp'

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