Skip to main content
Glama

find_elements

Search for UI elements in a mobile app using locators like XPath, accessibility ID, or text. Specify strategy or use auto-detection to find matching elements.

Instructions

Recherche des éléments dans l'application.

Args: locator: Le locator à chercher. Exemples : - "//*[@content-desc='MonBouton']" (XPath) - "accessibility_id=MonBouton" - "id=com.exemple.app:id/mon_bouton" - "predicate=label == 'Valider'" (iOS) - "MonTexte" (recherche par texte dans tous les attributs) strategy: "auto" (détection automatique), "text_search", ou une stratégie explicite : xpath, accessibility_id, id, name, class, android (uiautomator), predicate, class_chain.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
locatorYes
strategyNoauto

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
resultYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

B3.4/5.0
Behavior2/5

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

With no annotations provided, the description carries the full burden of behavioral disclosure. It does not state whether the operation is read-only, what happens when no elements match, whether it waits for elements, or how results are returned. The strategy details are useful but do not cover these behavioral traits.

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 compact and structured with an Args block. It front-loads the purpose, then gives parameter examples and allowed values without unnecessary prose. Every line adds value.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness3/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given the tool's moderate complexity and the presence of an output schema, the description covers locator syntax and strategy values well. However, it omits important context such as session requirements, error behavior, and what 'find' returns when multiple elements match. These gaps leave the agent with some uncertainty for correct invocation.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters5/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 0%, and the description fully compensates with rich parameter documentation. It provides concrete examples for the locator parameter and explains the strategy options including 'auto', 'text_search', and explicit strategies, adding meaning far beyond the bare schema.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description states the tool searches for elements in the application, which is a specific verb-resource pair. It does not explicitly differentiate from siblings like get_element_info or suggest_locators, but the name and description make the primary purpose clear.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines2/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

No guidance is given on when to use find_elements versus sibling tools, nor any prerequisites or exclusions. The description only explains how to construct locators and strategy options, which is parameter guidance rather than usage guidance.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.