Skip to main content
Glama
@mgcrea/mcp-ios-simulator

@mgcrea/mcp-ios-simulator

by mgcrea

iOS Simulator: Restart WebDriverAgent

ios_simulator_restart_wda

Start or restart the WebDriverAgent runner for an iOS Simulator so UI tree and input tools work after the runner dies; each simulator uses its own port.

Instructions

Start the WebDriverAgent runner, or restart it after it has died. Only the UI tree and the input tools need it — screenshots and everything simctl does keep working without it. Each simulator gets its own runner on its own port, so several can be driven at once. The runner is started detached so it outlives this conversation, and its output goes to a log file rather than to you. It does not wait: give it fifteen seconds or so, then check ios_simulator_diagnostics.

Input Schema

NameRequiredDescriptionDefault
portNoPort to bind, passed to the runner as USE_PORT. Leave it out: the simulator's current runner port is reused, or else the first free one from IOS_SIMULATOR_WDA_PORT up, and the other tools find the runner wherever it listens.
deviceNoWhich simulator: its UDID or its name as shown by ios_simulator_list. Omit it when exactly one is booted — that is the normal case, and IOS_SIMULATOR_ID pins it when it is not. Unlike simctl's own `booted`, this never picks arbitrarily between two.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changedv0.4.2
    • changedInput schema / properties / port / description
      Previous value: -"Port to bind, passed to the runner as USE_PORT. Defaults to IOS_SIMULATOR_WDA_PORT. Two simulators need two ports: they share this Mac's loopback, and a runner with no USE_PORT scans 8100-8199 and silently takes the next free one."New value: +"Port to bind, passed to the runner as USE_PORT. Leave it out: the simulator's current runner port is reused, or else the first free one from IOS_SIMULATOR_WDA_PORT up, and the other tools find the runner wherever it listens."
  2. First observedv0.2.0

TDQS

A4.5/5.0
Behavior5/5

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

Adds substantial behavior beyond the annotations: the runner is launched detached so it outlives the conversation, output goes to a log file rather than to the caller, and the call is non-blocking with a suggested ~15 second wait. Per-simulator port isolation and concurrent driving are also disclosed, none of which the annotations convey.

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?

Five sentences, each carrying distinct information: capability, scope of dependency, port/concurrency model, detached execution model, and the asynchronous verification step. Front-loaded with the action and 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?

No output schema exists, and the description compensates fully by explaining that nothing is returned synchronously and where output goes. For an asynchronous side-effecting tool it covers everything needed to invoke and follow up 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 both parameters and their fallback semantics (port reuse, device omission) are already documented in the schema. The description itself says nothing about port or device, so 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 — 'Start the WebDriverAgent runner, or restart it after it has died' — and immediately delimits which dependent tools need it. The agent can tell this apart from io_simulator_diagnostics or the tap/ui_tree tools without opening any schema.

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?

Explicitly says when the runner is needed (UI tree and input tools) and when it is not needed (screenshots, simctl operations), and routes the agent to ios_simulator_diagnostics to verify. It stops short of naming the failing symptom that should trigger a restart, but the intent is clear.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.