Skip to main content
Glama
XC-MCP: XCode CLI wrapper

XC-MCP: XCode CLI wrapper

by conorluddy

Erase Simulator (Factory Reset)

simctl-erase
DestructiveIdempotent

Reset iOS simulator devices to factory settings without deleting the device, clearing all apps and data for clean-state testing.

Instructions

simctl-erase

Reset iOS simulator devices to factory settings.

Overview

Resets a simulator to clean factory state without deleting the device itself. All apps and data are removed, but the simulator persists and can be immediately reused. Useful for clean state testing and fresh app installation workflows.

Confirmation

confirm: true is required before permanently deleting simulator or app data.

Batch selection

Use all:true or deviceType/runtime filters instead of deviceId. Batch operations target available simulators; erase/delete require confirm:true. Results report each attempted device independently.

Parameters

Required

  • deviceId (string): Device UDID to erase (from simctl-list)

Optional

  • force (boolean, default: false): Force erase even if device is booted

Returns

Erase status with device information, confirmation that device persists, wasBooted flag indicating if device was running during erase, success indicator, and guidance for next steps.

Examples

Erase simulator to clean state

await simctlEraseTool({ deviceId: 'ABC-123-DEF' });

Force erase booted device

await simctlEraseTool({
  deviceId: 'ABC-123-DEF',
  force: true
});
  • simctl-list: Find device UDID to erase

  • simctl-shutdown: Shutdown device before erase (if not using force)

  • simctl-boot: Boot device after erase to continue testing

Notes

  • Device persists after erase - only data is removed

  • All apps, preferences, and user data are deleted

  • Device returns to factory settings

  • Use force: true to erase booted device (otherwise must shutdown first)

  • Perfect for repeatable clean state testing

  • Faster than delete + create for reset workflows

Tool call template

This tool declares no required parameters. Add optional parameters from the input schema as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {},
    "name": "simctl-erase"
  }
}

Input Schema

NameRequiredDescriptionDefault
allNo
forceNo
confirmNoExplicitly confirm permanent data deletion.
runtimeNo
deviceIdNo
deviceTypeNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed5 schema fields changedv5.0.0
    • addedInput schema / properties / all
      Added value: +{
      +  "type": "boolean"
      +}
    • addedInput schema / properties / confirm
      Added value: +{
      +  "description": "Explicitly confirm permanent data deletion.",
      +  "type": "boolean"
      +}
    • addedInput schema / properties / deviceType
      Added value: +{
      +  "type": "string"
      +}
    • addedInput schema / properties / runtime
      Added value: +{
      +  "type": "string"
      +}
    • removedInput schema / required
      Removed value: -[
      -  "deviceId"
      -]
  2. Addedv4.1.0

TDQS

A4.4/5.0
Behavior5/5

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

Annotations already declare destructiveHint=true and idempotentHint=true, yet the description adds real substance: precisely what is destroyed (apps, preferences, user data), what survives (the device itself, immediately reusable), the confirm:true gate, and that booted devices require force:true. It also flags that batch results report each device independently, which matters for error handling.

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

Conciseness3/5

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

Well front-loaded and heading-structured, but bloated for a two-parameter operation: the Overview, Parameters, and Notes sections repeat the same facts about data deletion, device persistence, and force for booted devices three times. The two code examples add little that the parameter bullets did not already convey.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness4/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Despite no output schema, the Returns section enumerates the response shape (success, wasBooted, next-step guidance), and prerequisites, batch behavior, and related tools are all covered. The only shortfall is the unresolved tension between the description's 'Required: deviceId' claim and a schema with zero required properties, which leaves the batch path under-specified.

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 description coverage is only 17%, but the description compensates by documenting deviceId, force (with its booted-device semantics), confirm, and the all/deviceType/runtime batch filters that are otherwise bare in the schema. Residual gaps: no format or example values for runtime or deviceType, and it declares deviceId 'Required' while the schema lists no required fields, leaving the deviceId-vs-batch choice ambiguous.

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 ('Reset iOS simulator devices to factory settings') and immediately disambiguates from the closest sibling by clarifying that the device itself is not deleted. The distinction from simctl-delete is reinforced in the Notes ('Faster than delete + create for reset workflows'), so an agent can pick between them without opening either 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 routes to siblings: simctl-list to find the UDID, simctl-shutdown before erasing when not using force, simctl-boot afterwards, and points toward simctl-delete for create-style workflows. It also states the confirm and force conditions. It stops short of a hard 'use X instead when Y' exclusion, so it is strong but not exhaustive.

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