Skip to main content
Glama

get_page_source

Retrieve the current screen's XML hierarchy to inspect UI elements. Use simplified mode for essential attributes or full XML for complete details.

Instructions

Récupère l'arbre XML de l'écran actuel. C'est l'équivalent du DOM pour une application native.

Args: simplified: Si True, retourne une version allégée avec seulement les attributs utiles (type, text, label, content-desc, accessibility_id, bounds, enabled, visible). Si False, retourne le XML brut complet.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
simplifiedNo

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
resultYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A4.3/5.0
Behavior4/5

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

With no annotations provided, the description carries the full burden of behavioral disclosure. It clearly explains the tool returns an XML tree and details the effect of the 'simplified' parameter (full vs. reduced attributes). However, it does not mention potential side effects, error conditions, or performance implications. For a read-only retrieval tool, the core behavior is transparent, though edge cases are unaddressed.

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 concise: two sentences for purpose plus a clear arg explanation. It is front-loaded with the core purpose and the parameter description is directly attached. No filler or redundant content; every sentence earns its place.

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 the tool's simplicity (one optional parameter) and the presence of an output schema, the description is largely complete for calling the tool correctly. It covers the purpose and the parameter effect. It omits any prerequisites like an active session, but given sibling tools like connect_to_session, this may be assumed. The description is adequate, though it could explicitly note that a session must be active.

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

Parameters5/5

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

The schema provides no description for the 'simplified' parameter (coverage 0%), but the description fully explains its meaning and the difference between True and False, listing the included attributes. This completely compensates for the schema gap, giving the agent exact semantic information needed to use the parameter correctly.

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 tool retrieves the XML tree of the current screen, using a concrete analogy ('équivalent du DOM') that distinguishes it from siblings like find_elements or get_element_info. The verb 'Récupère' plus the resource 'arbre XML de l'écran actuel' is specific and unambiguous.

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 does not explicitly state when to use this tool versus alternatives, such as find_elements for targeted queries. The DOM analogy implies it is for getting the full structure, but no direct guidance is given about when to prefer it or when to avoid it. The usage context is implied rather than explicit.

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