Skip to main content
Glama

Robot Actions — Remote Device Control

ios_safari_console_logs

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?

With no annotations provided, the description carries full burden and does so thoroughly: it discloses the live-window semantics, buffered history caveat, enabled domains, and return format. The race condition warning is especially valuable. No contradiction with annotations because none exist.

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 longer than average, but every sentence earns its place: core action, event mechanics, live-window warning, trigger guidance, defaults, and page selection. No filler or redundancy; it front-loads the most important information.

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?

Everything needed to call correctly is present: return shape, page targeting, trigger mechanism, duration limits, and the critical live-window behavior. Without an output schema, the description appropriately fills in what the agent will receive.

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 baseline applies. The description confirms triggerJs, durationMs bounds, and pageId auto-picking, but does not add parameter-level meaning beyond what the schema already provides.

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?

Begins with a concrete verb and resource ('Collect console logs... Safari page'), names the specific event listeners, and describes the return shape. It is clearly distinct from siblings like ios_safari_capture_network or ios_safari_evaluate.

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?

Gives explicit guidance: pass triggerJs inside the window, warns that a separate tool call races the attach and misses events, states default/max window, and explains when to omit pageId. This prevents a common, subtle misuse.

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