Skip to main content
Glama

Robot Actions — Remote Device Control

iOS locators for

ios_locators_for
Read-onlyIdempotent

Generate ranked locator strategies for one element. Counterpart of device_locators_for. Pass either coordinates (x, y — picks the SMALLEST element containing the point) OR a label substring. Returns accessibility id, predicate string, class chain and XPath, best first, each with a note on why it ranks where it does. Use these to fill page-object selectors when generating test scripts instead of re-deriving them. Requires an active iOS automation session.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
xNoX of the element in screen points (use with y)
yNoY of the element in screen points (use with x)
udidYesiOS device UDID
labelNoLabel / name substring to look up instead of coordinates

Schema Changelog

Changes observed during successful MCP inspections.

  1. Added

TDQS

A4.5/5.0
Behavior4/5

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

Annotations already cover the safety profile (readOnly, idempotent, non-destructive, closed-world), and the description adds real context beyond them: the session prerequisite, the exact return contents (accessibility id, predicate string, class chain, XPath) with ranking notes, and the tie-break rule that coordinates select the SMALLEST element containing the point. Failure behavior when no element matches is not addressed.

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?

Five short sentences, front-loaded with purpose and input modes, then return shape, then the usage rationale and prerequisite. No filler or restatement of the tool name.

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?

With a fully documented 4-param schema, rich annotations and no output schema, the description supplies everything an agent needs: what it produces, how inputs are interpreted, the session precondition, and when to reach for it. Nothing material is missing.

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 coverage is 100%, so the baseline is 3, but the description adds meaning the schema lacks: coordinates resolve to the smallest containing element, and x/y versus label are mutually exclusive input modes. It also frames the udid requirement via the active-session prerequisite.

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 ('Generate ranked locator strategies for one element') with a clear scope limit of one element, and positions itself against the cross-platform sibling by naming device_locators_for as its counterpart. An agent can distinguish it from ios_find_element or ios_page_source 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 concrete usage context ('Use these to fill page-object selectors when generating test scripts instead of re-deriving them') plus the input-mode choice (coordinates OR label) and the prerequisite of an active iOS automation session. It does not name a competing tool to prefer in other situations, so it stops short of full when/when-not routing.

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