UNPKG

xc-mcp

Version:

MCP server that wraps Xcode command-line tools for iOS/macOS development workflows

20 lines 4.42 kB
/** * Unified iOS simulator device management tool. * * Routes device operations (boot, shutdown, create, delete, erase, clone, rename) * to specialized handlers while maintaining modular code organization. * * @param args Device operation and parameters * @returns Tool result with operation status * @throws McpError for invalid operation or execution failure */ export declare function simctlDeviceTool(args: any): Promise<{ content: { type: "text"; text: string; }[]; isError: boolean; }>; export declare const SIMCTL_DEVICE_DOCS = "\n# simctl-device\n\nUnified iOS simulator device management - boot, shutdown, create, delete, erase, clone, rename.\n\n## Overview\n\nSingle tool for all simulator device lifecycle operations. Routes to specialized handlers while maintaining clean operation semantics.\n\n## Complete JSON Examples\n\n### Boot a Simulator\n```json\n{\"operation\": \"boot\", \"deviceId\": \"ABCD1234-5678-90EF-GHIJ-KLMNOPQRSTUV\", \"waitForBoot\": true, \"openGui\": true}\n```\n\n### Shutdown Running Simulator\n```json\n{\"operation\": \"shutdown\", \"deviceId\": \"booted\"}\n```\n\n### Create New Simulator\n```json\n{\"operation\": \"create\", \"name\": \"Test iPhone 16\", \"deviceType\": \"iPhone 16 Pro\", \"runtime\": \"iOS-18-0\"}\n```\n\n### Delete Simulator\n```json\n{\"operation\": \"delete\", \"deviceId\": \"ABCD1234-5678-90EF-GHIJ-KLMNOPQRSTUV\"}\n```\n\n### Factory Reset (Erase)\n```json\n{\"operation\": \"erase\", \"deviceId\": \"simulator-udid\", \"force\": true}\n```\n\n### Clone Simulator\n```json\n{\"operation\": \"clone\", \"deviceId\": \"source-udid\", \"newName\": \"Snapshot Before Tests\"}\n```\n\n### Rename Simulator\n```json\n{\"operation\": \"rename\", \"deviceId\": \"simulator-udid\", \"newName\": \"My Test Device\"}\n```\n\n## Operations\n\n### boot\n\nBoot iOS simulator device with performance tracking.\n\n**Parameters:**\n- `deviceId` (string): Device UDID, \"booted\" for current, or \"all\"\n- `waitForBoot` (boolean, default: true): Wait for device to finish booting\n- `openGui` (boolean, default: true): Open Simulator.app GUI\n\n**Example:**\n```typescript\nawait simctlDeviceTool({ operation: 'boot', deviceId: 'ABC-123-DEF' })\n```\n\n---\n\n### shutdown\n\nShutdown iOS simulator devices.\n\n**Parameters:**\n- `deviceId` (string): Device UDID, \"booted\" for all booted devices, or \"all\"\n\n**Example:**\n```typescript\nawait simctlDeviceTool({ operation: 'shutdown', deviceId: 'ABC-123-DEF' })\n```\n\n---\n\n### create\n\nCreate new iOS simulator device.\n\n**Parameters:**\n- `name` (string): Display name for new simulator\n- `deviceType` (string): Device type (e.g., \"iPhone 16 Pro\")\n- `runtime` (string, optional): iOS version - defaults to latest\n\n**Example:**\n```typescript\nawait simctlDeviceTool({ operation: 'create', name: 'TestDevice', deviceType: 'iPhone 16 Pro' })\n```\n\n---\n\n### delete\n\nPermanently delete iOS simulator device.\n\n**Parameters:**\n- `deviceId` (string): Device UDID to delete\n\n**Example:**\n```typescript\nawait simctlDeviceTool({ operation: 'delete', deviceId: 'ABC-123-DEF' })\n```\n\n---\n\n### erase\n\nReset simulator to factory settings.\n\n**Parameters:**\n- `deviceId` (string): Device UDID to erase\n- `force` (boolean, optional): Force erase even if booted\n\n**Example:**\n```typescript\nawait simctlDeviceTool({ operation: 'erase', deviceId: 'ABC-123-DEF' })\n```\n\n---\n\n### clone\n\nClone simulator with complete state preservation.\n\n**Parameters:**\n- `deviceId` (string): Source device UDID\n- `newName` (string): Name for cloned simulator\n\n**Example:**\n```typescript\nawait simctlDeviceTool({ operation: 'clone', deviceId: 'ABC-123-DEF', newName: 'Snapshot' })\n```\n\n---\n\n### rename\n\nRename simulator device.\n\n**Parameters:**\n- `deviceId` (string): Device UDID to rename\n- `newName` (string): New display name\n\n**Example:**\n```typescript\nawait simctlDeviceTool({ operation: 'rename', deviceId: 'ABC-123-DEF', newName: 'Production' })\n```\n\n---\n\n## Related Tools\n\n- `simctl-list`: Discover simulators and their UDIDs\n- `simctl-app`: Install and launch apps on devices\n- `simctl-io`: Take screenshots and record videos\n"; export declare const SIMCTL_DEVICE_DOCS_MINI = "Manage simulator lifecycle (boot/shutdown/create/etc). Use rtfm({ toolName: \"simctl-device\" }) for docs."; //# sourceMappingURL=index.d.ts.map