Skip to main content
Glama

Robot Actions — Remote Device Control

iOS Safari list pages

ios_safari_list_pages
Read-onlyIdempotent

List inspectable Safari pages on an iOS device via the Web Inspector CDP bridge. Returns index, pageId (the CDP target id), url, title, type, active, and state per page, plus a top-level currentActiveTab (the pageId on screen, or null when none is). index is positional within THIS listing and is not stable across calls — resolve it to a pageId here, then pass that pageId. iOS shows exactly ONE tab at a time, so every ios_safari_* tool called WITHOUT pageId drives the active tab and refuses a backgrounded one — you do NOT need to list pages and thread an id just to act on the current tab, only to target a DIFFERENT one. state says what each page is doing, and the distinction matters because the fixes are opposite: "foreground" = the tab on screen (at most one, and it is the active: true one); "background" = alive but not visible, because another tab or another app is in front — pass its pageId explicitly to drive it anyway; "unresponsive" = the page answers nothing, either because it is suspended (device asleep or locked) or because a dialog (alert/confirm/prompt) is open and blocking the page — those look identical from here, so take a screenshot to tell them apart rather than assuming the device is asleep; "unprobed" = past the probe cap, nothing was measured. Pages "background" with no foreground means Safari is not frontmost. safariFrontmost answers that directly when the device can be asked: false means Safari is NOT the app on screen, so NO tab here is what the device is showing — the tabs are still alive and drivable, but do not read one as "what the user sees", and do not mistake a tab left over from earlier work for the one you just opened. It is omitted when it could not be determined, never guessed. Confirming state costs one bounded check per page (run in parallel), so this is a little slower than a bare listing and never fails the whole call just because nothing is in the foreground. Requires Web Inspector enabled: Settings → Safari → Advanced → Web Inspector.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
udidYesiOS device UDID
platformVersionNoIgnored (kept for compatibility)

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A4.5/5.0
Behavior5/5

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

Annotations already cover the safety profile (readOnly, idempotent, non-destructive), yet the description adds substantial operational context beyond them: confirming state costs one bounded check per page run in parallel, the call never fails just because nothing is foregrounded, `safariFrontmost` is omitted rather than guessed when undeterminable, and Web Inspector must be enabled in Settings. It even warns against misreading state (suspended vs. dialog-blocked look identical) and prescribes a screenshot to disambiguate.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness3/5

Is the description appropriately sized, front-loaded, and free of redundancy?

It is front-loaded with the purpose and the returned fields, and most sentences carry real information. However it runs to several dense paragraphs with visible redundancy — the 'one tab at a time / at most one foreground tab' point is made twice — and unbroken prose makes it harder to scan than the content warrants.

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?

There is no output schema, so the description must carry the full return contract, and it does: it enumerates every field (index, pageId, url, title, type, active, state, currentActiveTab, safariFrontmost) and defines each state value and its implications. Nothing needed to interpret the response or the environment prerequisites 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?

Schema coverage is 100% and only two parameters exist, one of which is explicitly 'Ignored (kept for compatibility)' in the schema itself. The description's pageId discussion concerns a returned value, not an input parameter, so it adds no meaning beyond what the schema already documents — the baseline 3 applies.

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 ('List inspectable Safari pages on an iOS device via the Web Inspector CDP bridge') and immediately enumerates the returned fields, so an agent knows exactly what it gets. It also distinguishes itself from the rest of the ios_safari_* family by explaining that those tools drive the active tab without needing this listing.

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?

Explicitly states when this tool is NOT needed: 'you do NOT need to list pages and thread an id just to act on the current tab, only to target a DIFFERENT one.' It also gives a concrete usage path (resolve `index` to a pageId here, then pass that pageId) and names the alternative behavior of the sibling tools.

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