Skip to main content
Glama

Element tree

page_source

Dumps the active screen's XCUITest element tree as XML with labels, types, and bounds to find exact tap coordinates.

Instructions

Dump the current screen's XCUITest element tree (XML) with labels, types, and bounds — use it to find exact tap coordinates.

Input Schema

NameRequiredDescriptionDefault

No arguments

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A4.2/5.0
Behavior3/5

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

No annotations are provided, so the description carries the full burden. It does disclose the return format (XML) and payload contents (labels, types, bounds) and implies a read-only snapshot of the current screen, but says nothing about output size/verbosity on complex screens, staleness of the snapshot, or failure modes when the screen is mid-transition.

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?

A single em-dash-joined sentence that front-loads what is returned and ends with the actionable purpose. No filler, nothing repeated from the title alone.

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?

For a zero-parameter, no-output-schema dump tool this is close to sufficient: format, contents, and purpose are all covered. The only gap is any hint about output volume or when the tree may not reflect the settled UI, which matters for a UI-automation agent parsing XML.

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?

Zero parameters, so there is nothing to disambiguate; the baseline of 4 applies. The description correctly implies the tool takes no input by scoping itself to "the current screen."

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?

States a specific verb and resource: dumps the current screen's XCUITest element tree as XML, with labels, types, and bounds. This concretely distinguishes it from the sibling screenshot tool, which returns pixels rather than an inspectable element hierarchy.

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?

"use it to find exact tap coordinates" gives a clear positive trigger, which is exactly the decision an agent needs. It stops short of an explicit exclusion (e.g., use screenshot for visual verification instead), so it lacks the alternative-routing that would earn a 5.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.