Skip to main content
Glama

Robot Actions — Remote Device Control

iOS Safari trace

ios_safari_trace

Record a Performance trace of a Safari page on an iOS device over a time window and write it to a file on the RDS host, returning { eventCount, durationMs, bytes, path }. The file loads directly in Chrome DevTools → Performance → "Load profile", so it can be handed to a human to read the flame chart. Traces are multi-MB, so the content is never returned inline. Captures main-thread work (tasks, script execution, style, layout, paint) together with a JavaScript CPU sample run, so the flame chart shows which functions the time went to. Use it for "why is this page slow/janky" — long tasks and repeated layout show up as wide bars. Pass url to navigate INSIDE the recording and capture the full page load, or triggerJs to fire an interaction inside the window (both are the usual way to trace something specific rather than idle time). Set screenshots=true to include a filmstrip (roughly doubles the file size). Default window: 5 000 ms. Maximum: 30 000 ms. Omit pageId to use the active tab. NOTE: on some iOS versions WebKit reports no elapsed time to a remote inspector, and every event is then stamped 0. The recorded work and its nesting are still real, but durations and the flame chart timeline are not; the result says timestamped=false when this happens, so do not read timings from a trace that reports it. Requires Web Inspector enabled: Settings → Safari → Advanced → Web Inspector.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
urlNoNavigate the page to this URL inside the recording to capture the full page load
udidYesiOS device UDID
pageIdNoTarget page id from ios_safari_list_pages (default: active tab)
triggerJsNoJavaScript to evaluate inside the recording window to trigger the work being traced
durationMsNoRecording window in milliseconds (default: 5000, max: 30000)
screenshotsNoInclude a filmstrip (default: false)

Schema Changelog

Changes observed during successful MCP inspections.

  1. Added

TDQS

A4.6/5.0
Behavior5/5

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

Annotations only say it is non-read-only, non-idempotent, non-destructive; the description adds far more: the trace is written to a file rather than returned inline because it is multi-MB, the return keys, the Chrome DevTools load path, the default and maximum window, the file-size cost of screenshots, and the Web Inspector prerequisite. The timestamped=false WebKit caveat is exactly the kind of failure mode an agent could not infer from structured fields.

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

Conciseness4/5

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

Front-loaded with the action, side effect and return value, then the usage guidance, then the critical timestamped=false warning. It is dense and mostly earns its length, though the middle passages on flame-chart interpretation and the DevTools handoff are more explanation than an agent needs to invoke the tool.

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 6-parameter mutation-ish tool with no output schema, the description covers everything needed: what is captured, where output goes, the return fields, default/max duration, prerequisite setup, and the silent-failure mode with its sentinel field. Nothing material is left for the agent to discover at call time.

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

Parameters4/5

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

Schema coverage is 100%, so the baseline is 3, but the description still adds real meaning: url navigates 'INSIDE the recording' to capture the full page load, triggerJs fires work inside the window, omitting pageId uses the active tab, and screenshots 'roughly doubles the file size'. It largely restates the schema's wording for url/triggerJs, which keeps it from a 5.

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 precise verb and resource ('Record a Performance trace of a Safari page on an iOS device') plus the side effect (writes a file on the RDS host) and the return shape. This cleanly separates it from device-level siblings like ios_performance_record_start and ios_safari_heap_snapshot without the agent needing to open their schemas.

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

Usage Guidelines4/5

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

Gives explicit context ('Use it for "why is this page slow/janky" — long tasks and repeated layout show up as wide bars') and tells the agent how to make the trace meaningful: pass url to capture a full page load or triggerJs to fire an interaction 'rather than idle time'. It never names a competing tool to use instead, so it stops short of a 5.

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