Skip to main content
Glama

Robot Actions — Remote Device Control

ios_safari_heap_snapshot

Take a JavaScript heap snapshot of a Safari page on an iOS device and write it to a file on the RDS host, returning { nodeCount, edgeCount, bytes, path }. The file is a V8-format .heapsnapshot that loads directly in Chrome DevTools → Memory → "Load profile", so it can be handed to a human to open. Snapshots are multi-MB, which is why the content is never returned inline. Use it to find what a page is retaining: take one, exercise the leak, take another, and compare nodeCount/edgeCount — a count that climbs and never comes back down across repetitions of the same interaction is the signal. Garbage is collected first by default so unreachable objects do not read as a leak; pass collectGarbage=false only when you deliberately want to measure uncollected garbage. Omit pageId to use the active tab. Requires Web Inspector enabled: Settings → Safari → Advanced → Web Inspector.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
udidYesiOS device UDID
pageIdNoTarget page id from ios_safari_list_pages (default: active tab)
collectGarbageNoRun garbage collection before snapshotting (default: true)

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?

With no annotations provided, the description carries the full burden of behavioral disclosure, and it does so thoroughly. It reveals that the tool writes a file to the RDS host (a side effect), never returns content inline due to multi-MB size, runs garbage collection by default and how to override it, and requires Web Inspector to be enabled. It also specifies the exact return fields. This is exemplary transparency for a tool with zero annotations.

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?

The description is dense but not wasteful; every sentence adds operational value. It front-loads the core purpose and outcome, then provides usage guidance, behavior details, and a prerequisite. It is slightly long, but for a tool of this complexity, the length is justified. It could be tightened slightly, but overall it is well-structured.

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 tool that writes a file, returns structured data, has a default garbage-collection behavior, and requires a specific device setting, the description covers all essential aspects: what it does, where the output goes, how to interpret the return values for leak detection, the default and override for collectGarbage, the pageId default, and the Web Inspector prerequisite. Nothing an agent needs to call it correctly is missing.

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?

The schema already provides descriptions for all three parameters (100% coverage), so the baseline is 3. The description adds meaningful semantics beyond the schema: it explains why collectGarbage should be set to false (to measure uncollected garbage) and reiterates the pageId default (active tab). It also clarifies the return structure. This added value justifies a 4.

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 states a specific verb (take), a resource (JavaScript heap snapshot of a Safari page on an iOS device), and the outcome (write to a file and return nodeCount/edgeCount/bytes/path). It clearly distinguishes this tool from the many iOS Safari siblings by its unique function (heap snapshotting). No ambiguity about what the tool does.

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?

The description gives a concrete usage pattern: take a snapshot, exercise the leak, take another, and compare counts to detect retention. It also explains when to set collectGarbage=false and notes that omitting pageId uses the active tab. It does not explicitly mention alternatives or exclusions, but the guidance is clear and actionable, so it earns a 4 rather than 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