Skip to main content
Glama

Robot Actions — Remote Device Control

session_find_element

Find one element in a WebDriver session and return the elementId that session_click and session_send_keys take. using selects the strategy — "css selector", "xpath", "id", "name", "link text", "partial link text", "tag name" or "class name" — and value is the query for it. Returns the FIRST match only, and errors rather than returning empty when nothing matches, so treat an error as 'not on the page yet' and retry after the page settles. Works on browser sessions and on mobile sessions, where the same strategies address native elements. Addressed by sessionId; the coordinate-free equivalents on a real device are device_find_element / ios_find_element (by udid).

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
usingYesLocator strategy (e.g. "css selector", "xpath", "id")
valueYesLocator value (e.g. "#login-btn", "//button[@id='submit']")
sessionIdYesSession ID

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A4.5/5.0
Behavior4/5

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

No annotations are provided, so the description carries the full burden. It discloses that it returns only the FIRST match, that it errors rather than returning empty when nothing matches, and advises treating an error as 'not on the page yet' and retrying after the page settles. This is meaningful behavioral context beyond the schema.

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?

The description is dense but well-organized: it opens with the core purpose, then explains parameters, then behavior, then scope and alternatives. Every sentence adds information; the only minor issue is that the strategy list is long, but it is necessary for correct invocation.

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?

For a 3-parameter tool with no output schema, the description covers the purpose, parameter semantics, return value, error behavior, and scope. It does not describe the exact shape of the returned elementId or the error format, but the description explicitly says the return is an elementId consumed by sibling tools, which is sufficient for an agent to invoke it 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 coverage is 100%, so the baseline is 3. The description adds value by explaining the relationship between `using` and `value` ('`using` selects the strategy... and `value` is the query for it') and by listing the exact allowed strategy strings, which the schema only gives examples of. It also clarifies the output's role as input to session_click and session_send_keys.

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 ('Find'), a resource ('one element in a WebDriver session'), and the output ('elementId that session_click and session_send_keys take'). It also enumerates the locator strategies, which distinguishes it from sibling find tools like device_find_element and ios_find_element.

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 explicitly says it works on browser and mobile sessions, and names the coordinate-free alternatives (device_find_element / ios_find_element by udid) for real devices. It also gives a clear when-to-use signal: use this when you have a sessionId and need an elementId for session_click/session_send_keys.

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