Skip to main content
Glama

Robot Actions — Remote Device Control

iOS wait for element

ios_wait_for_element
Read-onlyIdempotent

Wait until an element appears on screen, polling the accessibility tree. Counterpart of device_wait_for_element. Matches a case-insensitive SUBSTRING against label, name, value and placeholder. Returns { found, waitedMs, element? }. found=false is a normal answer, not an error — it means the element did not appear within the timeout, which is often the assertion you wanted. Matches elements the tree reports whether or not they are on screen, so a hit does NOT prove visibility; check element.visible. Requires an active iOS automation session.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
typeNoRestrict to an element type, e.g. Button (XCUIElementType prefix optional)
udidYesiOS device UDID
labelYesSubstring to wait for, matched against label / name / value / placeholder
timeoutNoMax wait in ms (default 10000)
intervalNoPoll interval in ms (default 500)

Schema Changelog

Changes observed during successful MCP inspections.

  1. Added

TDQS

A4.7/5.0
Behavior5/5

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

Annotations already cover the safe-read profile (readOnlyHint, idempotentHint), and the description goes well beyond them: substring matching semantics, the important caveat that a hit does not prove visibility and that element.visible must be checked, that found=false is a normal result rather than an error, and that a session must be active. This is exactly the extra behavioral context structured fields cannot carry.

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?

Four dense sentences, all front-loaded with the core action, then return contract, then the false-positive caveats, then the precondition. No filler and nothing buried.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness5/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

There is no output schema, and the description compensates by spelling out the return shape ({ found, waitedMs, element? }) and the meaning of found=false. Combined with the visibility caveat and session precondition, an agent has everything needed to call and interpret this tool correctly.

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 100%, so the baseline would be 3; the description adds real meaning on top by explaining that the label parameter is a case-insensitive substring matched against label/name/value/placeholder, which the schema only states tersely. Timeout/interval/type semantics remain schema-only.

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?

States a specific verb and resource ('Wait until an element appears on screen, polling the accessibility tree') and explicitly distinguishes itself from the sibling device_wait_for_element, which it names as its counterpart. An agent can tell it apart from ios_find_element and ios_elements_in_region without opening a schema.

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?

Gives clear context: useful when the timeout result is the assertion you wanted, and states the prerequisite of an active iOS automation session. It names the counterpart tool but does not explicitly say when to prefer this over ios_find_element, so it falls just short of full when/when-not guidance.

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

Try in Browser

Glama MCP Gateway

Add one secure layer between your agents and this server.

Resources