Skip to main content
Glama

Robot Actions — Remote Device Control

Device locators for

device_locators_for
Read-onlyIdempotent

Generate ranked locator strategies for a UI element on Android. Pass either coordinates (x, y — picks the smallest containing element) OR a text/contentDesc/resourceId to look up. Returns the same priority-ordered list the UI inspector shows: id, text, content-desc, accessibility selector, XPath. Use these to fill page-object selectors when generating test scripts so you do not have to re-derive them.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
xNoPhysical x coordinate of the element (use with y)
yNoPhysical y coordinate of the element (use with x)
textNoLookup by visible text (matches text or content-desc)
udidYesDevice serial number (UDID)
resourceIdNoLookup by resource-id
contentDescNoLookup by content-desc / accessibility label

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A4.3/5.0
Behavior4/5

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

Annotations already declare readOnly/idempotent/non-destructive, so the safety profile is covered. The description adds real value by disclosing the return shape (priority-ordered id, text, content-desc, accessibility selector, XPath) and the coordinate-mode rule (picks the smallest containing element), which annotations cannot convey.

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?

Three sentences, purpose front-loaded, no filler. The middle sentence is somewhat dense with parentheticals, but each clause carries actionable information.

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?

With no output schema, the description usefully documents the returned locator list and its priority ordering. It is complete enough to call correctly, though it omits edge-case behavior (missing element, conflicting inputs) for a tool that must resolve a target before returning locators.

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 would be 3, but the description adds meaning beyond the schema: the either/or exclusivity between coordinate mode and lookup mode, and the clarification that a query matches across text/content-desc/resourceId. It does not specify what happens if both or neither mode is passed.

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 a UI element on Android") and clearly scopes the platform. It is readily distinguishable from siblings like device_find_element, device_page_source, and ios_locators_for without opening any 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 an explicit use case ("fill page-object selectors when generating test scripts so you do not have to re-derive them") and explains the two input modes. It does not name alternative tools or state when-not to use it, so it stops short of full routing 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