Skip to main content
Glama
ghost-in-the-droid

ghost-in-the-droid

Official

get_screen_tree

Obtain a structured UI hierarchy of the current screen for understanding layout and choosing tap targets. Each node lists index, class, label, clickability, and coordinates, enabling precise action planning.

Instructions

Get an LLM-friendly indented UI hierarchy of the current screen. Each node shows: [idx] ClassName "label" [clickable] [x1,y1][x2,y2]. Use this to understand screen layout and pick which element to tap. Much more readable than raw XML — prefer this over get_elements() for planning.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
deviceYes

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
resultYes
Behavior4/5

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

With no annotations, the description carries the full burden. It describes the output format, readability, and that it reflects the current screen, but does not explicitly state read-only semantics or prerequisites. The detail is sufficient for a non-mutating query, falling just short of fully explicit.

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 three sentences, each serving a distinct purpose: function, output format, and usage guidance. There is no redundancy or fluff, and the most important information is front-loaded.

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 single-parameter, read-only UI hierarchy tool, the description covers purpose, output format, and usage context. It lacks parameter details and error scenarios, but the output schema and low complexity reduce the need for more, so it is nearly complete.

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

Parameters2/5

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

Schema coverage is 0% and the description does not mention the device parameter. While the parameter name is self-explanatory, the agent receives no guidance on valid values or how to specify the device, so the description fails to compensate for the schema gap.

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 clearly states the tool gets an LLM-friendly indented UI hierarchy, with a specific verb and resource. It also distinguishes itself from raw XML and get_elements(), making its purpose unambiguous relative to siblings.

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 says 'Use this to understand screen layout and pick which element to tap' and 'prefer this over get_elements() for planning.' This gives direct when-to-use guidance and names an alternative, satisfying the dimension fully.

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/ghost-in-the-droid/android-agent'

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