Skip to main content
Glama

Robot Actions — Remote Device Control

session_page_source

Return what a WebDriver session is currently showing as markup: the rendered DOM as HTML for a browser session, the native view hierarchy as XML for a mobile session. This is the WHOLE document — it can be very large, so prefer session_find_element when you only need one element, and reach for this when you need to see the structure or search it yourself. Addressed by sessionId; the device-side equivalents are device_page_source and ios_page_source (by udid), which return the on-screen hierarchy without a WebDriver session.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
sessionIdYesSession ID

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A4.5/5.0
Behavior4/5

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

No annotations are present, so the description carries the burden of behavioral disclosure. It warns that the result is the WHOLE document and can be very large, and frames the operation as read-only by using "Return what ... is currently showing." It does not cover failure modes or session-not-found behavior, but for a simple read tool this is reasonable coverage.

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?

Three sentences deliver the core purpose, return-type distinction, size warning, usage preference, and sibling alternatives. No filler; the most important scope and size information is front-loaded.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness5/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

For a single-parameter read tool with no output schema, the description fully covers what is returned, in what formats, how large it may be, when to avoid it, and which siblings to use instead. Nothing essential is missing.

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

Parameters3/5

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

The input schema already documents sessionId with 100% coverage. The description only repeats that the tool is "Addressed by sessionId" and adds no format, source, or syntax detail beyond the schema, so it meets the baseline but does not exceed it.

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 states a specific verb and resource: "Return what a WebDriver session is currently showing as markup," and clarifies output formats (HTML DOM vs XML native hierarchy). It also distinguishes itself from session_find_element, device_page_source, and ios_page_source, so an agent can tell it apart without opening schemas.

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

Usage Guidelines5/5

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

Provides explicit when-to-use guidance: prefer session_find_element for a single element, use this when needing the whole structure or self-directed search. It also names device-side equivalents and the condition under which they apply, making routing unambiguous.

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

Try in Browser

Glama MCP Gateway

Add one secure layer between your agents and this server.

Resources