Skip to main content
Glama

Robot Actions — Remote Device Control

Session find element

session_find_element
Read-onlyIdempotent

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.8/5.0
Behavior5/5

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

Annotations already declare the safety profile (readOnly, idempotent, non-destructive, openWorld), and the description adds substantial behavior beyond them: only the FIRST match is returned, an error is raised rather than an empty result when nothing matches, and the same strategies work on native mobile elements. These error and matching semantics are exactly what an agent needs and are not in the structured fields.

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 definition is front-loaded with purpose and return value before secondary details, and every sentence carries information (strategies, first-match semantics, error behavior, platform scope, alternatives). It is dense and somewhat long, but nothing reads as filler.

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 no output schema, the description still explains the return value (elementId) and the failure mode, and covers cross-platform applicability and the sessionId addressing. Nothing an agent needs to call this correctly 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 value the schema does not: it enumerates the complete set of `using` strategies (the schema only offers 'e.g.' examples) and clarifies that `value` is the query for the chosen strategy. That elevates it above the schema-only baseline.

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 ('Find one element in a WebDriver session') and immediately says what it returns ('the elementId that session_click and session_send_keys take'), tying it to the callers that consume its output. This distinguishes it from sibling find tools without requiring the schema.

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?

It explicitly routes the agent: use this for WebDriver sessions (browser and mobile), and use device_find_element / ios_find_element for coordinate-free access on a real device by udid. It also gives an explicit error-handling heuristic ('treat an error as not on the page yet and retry after the page settles'), which is genuine when-to-use 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