Skip to main content
Glama

native-full-hierarchy

Retrieve the full UIKit view hierarchy to debug deep layout issues and inspect views without accessibility labels.

Instructions

Get the complete UIKit view tree for the running app. WARNING: Output can be extremely large (100KB–500KB+) for complex apps, especially those built with SwiftUI. Prefer native-find-views for targeted queries. Use skipClasses / skipClassPrefixes to prune SwiftUI internal subtrees and reduce output size. Use the fields param to request only the properties you need. Use when you need deep layout debugging, finding views with no accessibility labels, or verifying view structure not exposed through the accessibility tree. Returns { status: "ok", windows } with the full view hierarchy, or { status: "restart_required" } if the dylib is not injected. Fails if native devtools are not connected or the app is not running.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
udidYesSimulator UDID
fieldsNoView fields to include. Use EXACT names: className, frame, hidden, alpha, identifier, label, nativeID, userInteractionEnabled, depth, pointer, tag, windowFrame, bounds, center, opaque, clipsToBounds, transform, contentMode, backgroundColor, tintColor, layerName. Defaults to all of the first group when omitted.
bundleIdYesBundle ID of the app
maxDepthNoMaximum recursion depth (default 8). Increase for deeper inspection, decrease to reduce output size.
skipClassesNoExact UIView class names whose entire subtree should be pruned (e.g. ["UIImageView"] to drop image leaf nodes)
skipClassPrefixesNoClass name prefixes to prune entire subtrees. For SwiftUI apps use ["_TtGC7SwiftUI"] to drop mangled SwiftUI generic type subtrees while keeping _UIHostingView and UIKit bridges. Avoid broad prefixes like "_UI" — they prune useful system views.
Behavior4/5

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

With no annotations, the description fully covers behavioral traits: large output warning, failure conditions (devtools not connected, app not running), pruning via skipClassPrefixes, and return statuses. Minor omission of detailed response structure for 'windows'.

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?

Six sentences with no redundancy: purpose, warning, pruning advice, use cases, return info, failure conditions. Front-loaded with purpose, each sentence essential.

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?

Given 6 params, no output schema, and complexity, the description covers purpose, warnings, use cases, failures, and return status. Lacks explicit structure of 'windows' but overall adequate. No output schema reduces burden.

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

Parameters4/5

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

Schema coverage is 100%, baseline 3. Description adds value by explaining how to use skipClassPrefixes for SwiftUI, fields defaults, and maxDepth for output control—beyond schema definitions.

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 it obtains the complete UIKit view tree using the verb 'Get' and specifies the resource. It distinguishes itself from sibling tool native-find-views by mentioning it is for targeted queries.

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?

Explicitly states when to use (deep layout debugging, finding unlabeled views) and when not to (prefer native-find-views for targeted queries). Provides constraints like large output and pruning strategies, covering both context and alternatives.

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/software-mansion/argent'

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