Skip to main content
Glama

Robot Actions — Remote Device Control

ios_safari_get_dom

Get the outer HTML of a Safari page (or a CSS-selector-matched element) on an iOS device via the Web Inspector. Executes document.documentElement.outerHTML, or document.querySelector(selector)?.outerHTML when a selector is provided. Output is capped at 100 000 characters; a truncation notice is appended when the limit is hit. Omit pageId to auto-pick the active Safari page.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
udidYesiOS device UDID
pageIdNoCDP target id from ios_safari_list_pages. Omit it to use the page ios_safari_navigate last landed on (or, failing that, the first loaded page) — only pass it to target a DIFFERENT tab
selectorNoOptional CSS selector — returns outerHTML of the first matching element, or null if not found
platformVersionNoIgnored (kept for compatibility)

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changed
    • changedInput schema / properties / pageId / description
      Previous value: -"CDP target id from ios_safari_list_pages — auto-picked when omitted"New value: +"CDP target id from ios_safari_list_pages. Omit it to use the page ios_safari_navigate last landed on (or, failing that, the first loaded page) — only pass it to target a DIFFERENT tab"
  2. First observed

TDQS

A4/5.0
Behavior4/5

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

With no annotations, the description carries the full behavioral burden and does a solid job: it discloses the exact read-only JS executed, the 100,000-character output cap, the truncation notice, and the pageId auto-pick behavior. It does not explicitly address failure modes or permissions, but for a read-only getter the key behavioral details are present.

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 tight sentences are front-loaded with purpose, then implementation, then critical output limits, with zero filler. Every sentence serves a distinct job: what it returns, how it computes it, and what caveats apply.

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 simple read-only tool with no output schema and no annotations, the description is nearly complete: it explains the return value, selector behavior, truncation, and pageId semantics. It falls just short of mentioning error conditions and explicit return type/null behavior when a selector matches nothing, though the schema partially covers those.

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?

Schema coverage is 100% and the parameter descriptions are already rich (pageId target selection, selector null behavior, ignored platformVersion). The tool description adds some implementation color but does not meaningfully go beyond what the schema already documents, so the baseline of 3 is appropriate.

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 opens with a specific action and resource: 'Get the outer HTML of a Safari page (or a CSS-selector-matched element) on an iOS device via the Web Inspector.' It also names the exact JavaScript calls, which makes it easy to distinguish from generic get-dom or evaluate tools.

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 use case is implied by 'Get the outer HTML of a Safari page' and 'via the Web Inspector,' so an agent can infer when to reach for it. However, it never explicitly contrasts this with nearby siblings like ios_safari_elements, ios_safari_evaluate, or webpage_get_dom, and there is no when-not-to-use guidance.

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