Skip to main content
Glama

Robot Actions — Remote Device Control

iOS Safari console logs

ios_safari_console_logs
Read-onlyIdempotent

Collect console logs, exceptions, and log entries from a Safari page on an iOS device over a time window. Enables the Runtime and Log domains, then listens for Runtime.consoleAPICalled, Runtime.exceptionThrown, and Log.entryAdded events, and returns an array of { level, text, url?, line?, source? }. This is a LIVE-WINDOW collector: it only captures events fired AFTER it attaches (plus the buffered history WebKit replays on enable), so triggering the logging from a SEPARATE tool call races the attach and is missed. To capture logs from an action, pass triggerJs (run inside the window). Default window: 5 000 ms. Maximum: 15 000 ms. Omit pageId to auto-pick the active 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
triggerJsNoJavaScript run INSIDE the collection window (after the listeners attach) so the logs it produces are captured race-free — e.g. "location.reload()" or "document.querySelector('#go').click()". Prefer this over triggering from a separate call.
durationMsNoCollection window in milliseconds (default: 5000, max: 15000)
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.7/5.0
Behavior5/5

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

Annotations already declare readOnly/idempotent/non-destructive, yet the description adds substantial behavior the annotations cannot carry: it enables Runtime and Log domains, subscribes to three specific events, returns a typed array, only captures events fired AFTER attach (plus replayed buffer), and defaults to a 5 000 ms window capped at 15 000 ms.

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?

Purpose is front-loaded, followed by mechanism, the critical timing caveat, and parameter defaults in that order. Every sentence carries distinct information with no filler.

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?

With no output schema, the description still supplies the return shape ({ level, text, url?, line?, source? }), the collection window bounds, and the page-selection default — everything an agent needs to call it correctly.

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 description coverage is 100%, so the schema already documents udid, pageId, triggerJs, durationMs, and why platformVersion is ignored. The description restates the default/max window and the triggerJs race semantics rather than adding new syntax or format detail, so 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?

The description opens with a specific verb and resource — 'Collect console logs, exceptions, and log entries from a Safari page on an iOS device over a time window' — and names the exact event domains (Runtime, Log) it drives. An agent can immediately distinguish it from session_console_logs, web_console_messages, and android_devtools_console_logs.

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?

It gives explicit when-to-use rules: it is a LIVE-WINDOW collector, so triggering logging from a separate call races the attach and is missed; instead pass triggerJs to run inside the window. It also states the pageId auto-pick default and when to override it.

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