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

ghost-in-the-droid

Official

get_elements

Get a JSON array of all UI elements on the current screen, including text, bounds, and clickability, to understand the layout before taking action.

Instructions

Get all UI elements on the current screen as a JSON array. Each element has: idx, text, content_desc, resource_id, class, bounds, center, clickable, scrollable. Use element idx with tap_element(). Call this to understand the screen layout before acting.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
deviceYes
interactive_onlyNo

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
resultYes
Behavior2/5

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

The description lists output fields and suggests a read-only use case, but the claim of 'all UI elements' conflicts with the interactive_only parameter default true, which likely filters results. With no annotations, the description carries the full burden but omits this filtering behavior, making it misleading.

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 two sentences with no redundancy. The first sentence states the main action, the second provides essential field names and usage context, making it appropriately sized and front-loaded.

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?

Although an output schema exists, the description fails to explain the required device parameter and misrepresents the element list scope due to the interactive_only filter. This creates ambiguity about how the tool actually behaves in default mode.

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

Parameters1/5

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

Input schema has zero descriptions (0% coverage), and the tool description does not mention parameters at all. The required 'device' and optional 'interactive_only' are completely unexplained, leaving the agent to guess their meaning.

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 'Get all UI elements on the current screen as a JSON array' with a specific verb and resource, and distinguishes from siblings like get_screen_tree by focusing on a flat element list with specific fields. It also references tap_element() by idx, reinforcing its purpose.

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

Usage Guidelines4/5

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

States 'Call this to understand the screen layout before acting,' providing clear context for when to use. It also shows how to use the output with tap_element(), but does not explicitly mention when not to use it or alternatives like get_screen_xml.

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