Skip to main content
Glama

xcresult_get_ui_element

Fetches comprehensive details of a UI element by index from a saved UI hierarchy JSON file, with an option to include child elements.

Instructions

Get full details of a specific UI element by index from a previously exported UI hierarchy JSON file

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
hierarchy_json_pathYesAbsolute path to the UI hierarchy JSON file (the full version saved by xcresult-get-ui-hierarchy)
element_indexYesIndex of the element to get details for (the "j" value from the slim hierarchy)
include_childrenNoWhether to include children in the response. Defaults to false.
Behavior3/5

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

No annotations are provided, so the description must carry the burden. It discloses it is a retrieval operation ('get full details') but does not explicitly state it is read-only or discuss side effects. The reference to the slim hierarchy adds context but lacks explicit behavioral traits.

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 a single concise sentence with no wasted words. It is front-loaded with the key action and context.

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 no output schema and limited annotations, the description adequately explains the tool's purpose and prerequisites. It could mention return format or error conditions, but for a simple retrieval tool with three parameters, it is sufficiently complete.

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% with descriptions. The description adds meaning: hierarchy_json_path is 'the full version saved by xcresult-get-ui-hierarchy', element_index is 'the j value from the slim hierarchy', and include_children has a default. This links to the prerequisite tool and clarifies parameter usage beyond 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 verb 'Get', resource 'full details of a specific UI element', and context 'from a previously exported UI hierarchy JSON file'. It distinguishes from sibling tools like xcresult_get_ui_hierarchy (which exports the hierarchy) and xcresult_browse (browse results).

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

Usage Guidelines3/5

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

The description implies usage after exporting a UI hierarchy file, but does not explicitly state when to use this tool vs alternatives. No exclusions or conditions are given, only implied context.

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

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