Skip to main content
Glama

Robot Actions — Remote Device Control

ios_locators_for

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.2/5.0
Behavior4/5

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

With no annotations provided, the description carries the full behavioral burden and does well: it discloses the smallest-element hit-testing rule for coordinates, the ranked best-first ordering with explanatory notes, the exact output types (accessibility id, predicate string, class chain, XPath), and the active-session precondition. It does not state what happens when both label and coordinates are passed or when neither is provided, a minor gap.

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 four sentences with no filler: it sequentially covers purpose, input modes with the key hit-testing nuance, output format and ordering, and the intended use case. Information is front-loaded and each 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 no output schema and no annotations, the description adequately explains what is returned and in what order, how to specify the target element, and the session requirement. It stops short of covering edge cases like unspecified parameter combinations or behavior when no element matches, but an agent can invoke the tool correctly with the information provided.

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 four parameters are already documented. The description adds useful relational context—x/y are a pair ('use with x/y') and form an alternative to label—and explains the coordinate interpretation ('picks the SMALLEST element'). This is reinforcing rather than substantially extending the schema, aligning with the baseline of 3.

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 states a specific verb and resource: 'Generate ranked locator strategies for one element.' It further distinguishes the tool from a sibling by explicitly naming 'Counterpart of device_locators_for,' and the iOS-specific scope is reinforced by the session requirement. This leaves no ambiguity about what the tool does.

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 gives clear contextual guidance: pass either coordinates or a label substring, and use the results 'to fill page-object selectors when generating test scripts instead of re-deriving them.' It names the counterpart sibling but does not explicitly explain when to choose ios_locators_for over device_locators_for, and it offers no exclusions (e.g., when a simpler find_element would suffice).

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