Skip to main content
Glama

xcresult_get_ui_hierarchy

Extract UI hierarchy from .xcresult files for Xcode tests, providing raw accessibility trees or JSON formats tailored for AI processing.

Instructions

Get UI hierarchy attachment from test. Returns raw accessibility tree (best for AI), slim AI-readable JSON (default), or full JSON.

Input Schema

NameRequiredDescriptionDefault
full_hierarchyNoSet to true to get the full hierarchy (several MB). Default is false for AI-readable slim version.
raw_formatNoSet to true to get the raw accessibility tree text (most AI-friendly). Default is false for JSON format.
test_idYesTest ID or index number to get UI hierarchy for
timestampNoOptional timestamp in seconds to find the closest UI snapshot. If not provided, uses the first available UI snapshot.
xcresult_pathYesAbsolute path to the .xcresult file

Input Schema (JSON Schema)

{ "properties": { "full_hierarchy": { "description": "Set to true to get the full hierarchy (several MB). Default is false for AI-readable slim version.", "type": "boolean" }, "raw_format": { "description": "Set to true to get the raw accessibility tree text (most AI-friendly). Default is false for JSON format.", "type": "boolean" }, "test_id": { "description": "Test ID or index number to get UI hierarchy for", "type": "string" }, "timestamp": { "description": "Optional timestamp in seconds to find the closest UI snapshot. If not provided, uses the first available UI snapshot.", "type": "number" }, "xcresult_path": { "description": "Absolute path to the .xcresult file", "type": "string" } }, "required": [ "xcresult_path", "test_id" ], "type": "object" }

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/lapfelix/XcodeMCP'

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