Skip to main content
Glama

elements

Retrieve UI elements from accessibility trees to analyze application interfaces. Filter by role, state, hierarchy, and source for comprehensive UI exploration.

Instructions

Get UI elements from the accessibility tree.

Returns a broad view of available elements.  Use find() instead
when you know the element's name -- it is faster and ranked.

Args:
    app: Scope to this application.
    window_id: Scope to this window.
    tree: If true, include parent/child hierarchy.
    max_depth: Maximum tree depth (0 = immediate children only).
    root_element: Start from this element ID (drill into a container).
    max_elements: Maximum elements to return (prevents huge results).
    role: Only include this role (e.g. "button", "text_field").
    states: Only include elements with ALL these states.
    named_only: If true, exclude elements with empty names.
    sort_by: None (default, tree order) or "position" for reading order (top-to-bottom, left-to-right).
    source: "full" (default, merged native+web), "ax" (CDP AX tree only), "native" (platform only), or "dom" (live DOM).

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
appNo
window_idNo
treeNo
max_depthNo
root_elementNo
max_elementsNo
roleNo
statesNo
named_onlyNo
sort_byNo
sourceNofull

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/Touchpoint-Labs/Touchpoint'

If you have feedback or need assistance with the MCP directory API, please join our Discord server