Skip to main content
Glama

ios_find_element

Locate UI elements in iOS simulators using accessibility labels or values to obtain tap coordinates for automated testing, eliminating the need for screenshots.

Instructions

Find a UI element on iOS simulator by accessibility label or value. Returns element details including tap coordinates. Requires IDB (brew install idb-companion). Workflow: 1) wait_for_element, 2) find_element, 3) tap with returned coordinates. Prefer this over screenshots for button taps.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
labelNoExact accessibility label match
labelContainsNoPartial label match (case-insensitive)
valueNoExact accessibility value match
valueContainsNoPartial value match (case-insensitive)
typeNoElement type to match (e.g., 'Button', 'TextField')
indexNoIf multiple elements match, select the nth one (0-indexed, default: 0)
udidNoOptional simulator UDID. Uses booted simulator if not specified.
Behavior3/5

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

With no annotations provided, the description carries the full burden of behavioral disclosure. It mentions the prerequisite (IDB installation) and the workflow context, which adds value. However, it lacks details on error handling, performance characteristics (e.g., timeouts), or what happens if no element is found. For a tool with 7 parameters and no annotations, more behavioral context would be helpful.

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 efficiently structured with four sentences, each adding distinct value: purpose, prerequisite, workflow, and comparison. There is no redundant information, and it's front-loaded with the core functionality. 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 complexity (7 parameters, no annotations, no output schema), the description is reasonably complete. It covers purpose, prerequisites, workflow, and alternatives. However, without an output schema, it could benefit from more details on the return format (e.g., structure of 'element details'), but the mention of 'tap coordinates' provides some context. The description compensates well for the lack of annotations.

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 the schema already documents all 7 parameters thoroughly. The description adds no additional parameter-specific information beyond what's in the schema (e.g., it doesn't clarify parameter interactions or precedence). The baseline score of 3 is appropriate 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 clearly states the specific action ('Find a UI element on iOS simulator'), the mechanism ('by accessibility label or value'), and the outcome ('Returns element details including tap coordinates'). It distinguishes from sibling tools like 'ios_screenshot' by explicitly stating 'Prefer this over screenshots for button taps.'

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 provides explicit guidance on when to use this tool ('Prefer this over screenshots for button taps'), includes a workflow context ('Workflow: 1) wait_for_element, 2) find_element, 3) tap with returned coordinates'), and mentions prerequisites ('Requires IDB (brew install idb-companion)'). It effectively distinguishes from alternatives like 'ios_screenshot' and 'ios_tap_element'.

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/igorzheludkov/metro-logs-mcp'

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