Skip to main content
Glama
jegriffi91

Mobile Automator MCP Server

by jegriffi91

Get UI Hierarchy

get_ui_hierarchy
Read-onlyIdempotent

Capture the UI element tree from a booted iOS simulator to inspect accessibility nodes and pixel bounds for automated testing.

Instructions

Capture the current UI element tree from a booted simulator. Works standalone (auto-targets the sole booted device) or within a recording session via sessionId. Returns a normalized accessibility tree with pixel bounds for point-based taps when selectors don't match. Use interactiveOnly to filter to tappable elements.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
compactNoIf true, collapse single-child chains and strip anonymous containers to reduce tree depth.
sessionIdNoActive session ID. If omitted, auto-targets the sole booted simulator.
artifactPathNoIf set, write the full hierarchy JSON to this file path and return only a summary with node count.
interactiveOnlyNoIf true, return only elements with id, label, or text — stripping non-interactive nodes.
includeRawOutputNoIf true, include the raw CLI/daemon output string in the response (default: omitted to save context).

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
hierarchyYesNormalized UI element tree
nodeCountNoTotal number of nodes in the hierarchy tree.
rawOutputNoRaw output from the automation backend (CSV from daemon, JSON from CLI). Only included when includeRawOutput is true.
diagnosticsNoDiagnostic warnings when the result may be incomplete (e.g., empty parsed tree with non-empty raw output).
artifactPathNoPath where the full hierarchy was written, if artifactPath was specified.
Behavior4/5

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

Annotations already declare readOnlyHint=true, openWorldHint=true, idempotentHint=true, destructiveHint=false. The description adds useful context about point-based taps and matching, but the annotations already cover the safety profile well.

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?

Three sentences, front-loaded with the main action. Efficient and no unnecessary words.

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

Completeness5/5

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

Given 5 parameters, good annotations, and an existing output schema, the description covers main use cases, mentions sessionId, interactiveOnly, and return type. It is complete for a read-only, idempotent tool.

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?

Schema description coverage is 100%, so the schema already documents all parameters. The description does not add significant additional meaning beyond what the schema provides, e.g., it repeats the interactiveOnly purpose already in the schema.

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 captures the UI element tree from a booted simulator, specifying standalone or session-based usage. It mentions returning a normalized accessibility tree with pixel bounds, distinguishing it from siblings like take_screenshot or execute_ui_action.

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?

The description explains when to use (capturing UI hierarchy) and how to use it (standalone or with sessionId, filtering with interactiveOnly). However, it does not explicitly mention when not to use or provide alternatives among the sibling tools.

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/jegriffi91/mobile-automator-mcp'

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