Skip to main content
Glama

get-element-tree

Retrieve a hierarchical view of mobile app UI elements for automation testing and debugging. This tool provides structured element data to identify and interact with components during mobile app development.

Instructions

Get a hierarchical view of the UI elements (similar to Appium Inspector)

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
maxDepthNoMaximum depth to traverse in the element tree (default: 5)
Behavior2/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 of behavioral disclosure. It mentions the output is a 'hierarchical view' but doesn't specify format (e.g., JSON, XML), whether it's read-only (implied by 'Get'), performance implications, or error conditions. For a tool with no annotation coverage, this leaves significant gaps in understanding its behavior.

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 a single, efficient sentence that directly states the tool's purpose with a helpful analogy. It's front-loaded with the core functionality and has zero wasted words, making it easy to parse quickly.

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

Completeness2/5

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

For a tool with no annotations and no output schema, the description is insufficient. It doesn't explain the return format, error handling, or how the hierarchical view relates to other UI inspection tools in the sibling list. Given the complexity of UI testing and the rich sibling context, more completeness is needed to guide effective use.

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

Parameters3/5

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

The description adds no parameter information beyond what's in the schema, which has 100% coverage for the single parameter 'maxDepth'. The schema description explains it well ('Maximum depth to traverse in the element tree (default: 5)'), so the baseline score of 3 is appropriate as the schema does the heavy lifting.

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 clearly states the tool's purpose: 'Get a hierarchical view of the UI elements' with a helpful analogy to 'Appium Inspector'. This specifies the verb ('Get') and resource ('hierarchical view of UI elements'), making it understandable. However, it doesn't explicitly differentiate from siblings like 'get-page-source' or 'save-ui-hierarchy', which might offer similar functionality.

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?

The description provides no guidance on when to use this tool versus alternatives. With many sibling tools for UI inspection (e.g., 'get-page-source', 'inspect-element', 'save-ui-hierarchy'), there's no indication of when this hierarchical view is preferred over other methods, nor any prerequisites or exclusions mentioned.

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

Install Server

Other Tools

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/Rahulec08/appium-mcp'

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