Skip to main content
Glama

Element tree

page_source
Read-onlyIdempotent

Dumps the current 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.

Tool call template

This tool declares no required parameters. Add optional parameters from the input schema as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {},
    "name": "page_source"
  }
}

Input Schema

NameRequiredDescriptionDefault

No arguments

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A4.1/5.0
Behavior4/5

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

Annotations already cover readOnly/idempotent/non-destructive, so the bar is lower, and the description adds genuinely new context: the return format is XML and it exposes label, type, and bounds attributes. It omits a caveat about tree size/verbosity, which matters for a full-screen dump, keeping it from a 5.

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 front-loaded sentence that names the operation and payload, then immediately follows with the actionable use case. No filler or redundant restatement of the title.

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?

With no output schema, the description is the only source of return-value information, and it does describe the payload shape and the attributes exposed. What's missing is a note on output volume or timing, which would matter for an unfiltered full-tree dump.

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?

The tool takes zero parameters, so the baseline is 4. The description correctly implies the call needs no targeting input, and there is nothing parameter-related left to clarify.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

States a specific verb and resource: 'Dump the current screen's XCUITest element tree (XML)', plus what the payload contains (labels, types, bounds). It is clearly distinct from siblings like screenshot or current_app, though it never explicitly contrasts with them, which keeps it at 4 rather than 5.

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 concrete task context for selecting this tool over a visual artifact like screenshot. There is no explicit when-not guidance or named alternative, so it stops short of a 5.

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