xc-mcp
Version:
MCP server that wraps Xcode command-line tools for iOS/macOS development workflows
56 lines • 5.75 kB
TypeScript
/**
* List iOS simulators with intelligent progressive disclosure and caching
*
* **What it does:**
* Retrieves comprehensive simulator information including devices, runtimes, and device types.
* Returns concise summaries by default with cache IDs for progressive access to full details,
* preventing token overflow while maintaining complete functionality.
*
* **Why you'd use it:**
* - Prevents token overflow with 10k+ device lists via progressive disclosure
* - Shows booted devices and recently used simulators first for faster workflows
* - 1-hour intelligent caching eliminates redundant queries
* - Provides smart filtering by device type, runtime, and availability
* - Limits full output to most recently used devices for efficient browsing
*
* **Parameters:**
* - `deviceType` (string, optional): Filter by device type (e.g., "iPhone", "iPad")
* - `runtime` (string, optional): Filter by iOS runtime version (e.g., "17", "iOS 17.0")
* - `availability` (string, optional): Filter by availability ("available", "unavailable", "all")
* - `outputFormat` (string, optional): Output format ("json" or "text")
* - `concise` (boolean, optional): Return concise summary with cache ID (default: true)
* - `max` (number, optional): Maximum devices to return in full mode (default: 5, sorted by lastUsed)
*
* **Returns:**
* - Concise mode: Summary with cacheId for detailed retrieval via simctl-get-details
* - Full mode: Limited device list (default 5 most recently used) with metadata about limiting
*
* **Example:**
* ```typescript
* // Get concise summary (default - prevents token overflow)
* await simctlListTool({})
*
* // Get full list for iPhone devices (limited to 5 most recent)
* await simctlListTool({ deviceType: "iPhone", concise: false })
*
* // Get full list with custom limit
* await simctlListTool({ concise: false, max: 10 })
*
* // Filter by iOS version
* await simctlListTool({ runtime: "17.0" })
* ```
*
* **Full documentation:** See simctl/list.md for detailed parameters and progressive disclosure
*
* @param args Tool arguments including optional filters, format, and max device limit
* @returns Tool result with simulator list or summary with cache ID
*/
export declare function simctlListTool(args: any): Promise<{
content: {
type: "text";
text: string;
}[];
}>;
export declare const SIMCTL_LIST_DOCS = "\n# simctl-list\n\nList iOS simulators with intelligent progressive disclosure and caching.\n\n## Overview\n\nRetrieves comprehensive simulator information including devices, runtimes, and device types. Returns concise summaries by default with cache IDs for progressive access to full details, preventing token overflow while maintaining complete functionality. Shows booted devices and recently used simulators first for faster workflows. Full output mode limits results to the most recently used devices for efficient browsing.\n\n## Parameters\n\n### Required\nNone - all parameters are optional\n\n### Optional\n- **deviceType** (string): Filter by device type (e.g., \"iPhone\", \"iPad\")\n- **runtime** (string): Filter by iOS runtime version (e.g., \"17\", \"iOS 17.0\")\n- **availability** (string, default: \"available\"): Filter by availability (\"available\", \"unavailable\", \"all\")\n- **outputFormat** (string, default: \"json\"): Output format (\"json\" or \"text\")\n- **concise** (boolean, default: true): Return concise summary with cache ID\n- **max** (number, default: 5): Maximum devices to return in full mode, sorted by lastUsed date (most recent first)\n\n## Returns\n\n- Concise mode: Summary with cacheId for detailed retrieval via simctl-get-details\n- Full mode: Limited device list (default 5 most recently used) with metadata showing total available and limit applied\n\n## Device Limiting in Full Mode\n\nWhen `concise: false`, the response includes:\n- **devices**: Top N devices across all runtimes, sorted by lastUsed date (most recent first)\n- **metadata**: Shows total devices in cache, devices returned, and limit applied\n- Devices without lastUsed date are placed at the end\n- Total limit applies across all runtimes, not per-runtime\n\n## Examples\n\n### Get concise summary (default - prevents token overflow)\n```typescript\nawait simctlListTool({});\n```\n\n### Get full list for iPhone devices (limited to 5 most recent)\n```typescript\nawait simctlListTool({\n deviceType: \"iPhone\",\n concise: false\n});\n```\n\n### Get full list with custom device limit\n```typescript\nawait simctlListTool({\n concise: false,\n max: 10\n});\n```\n\n### Filter by iOS version\n```typescript\nawait simctlListTool({ runtime: \"17.0\" });\n```\n\n## Related Tools\n\n- simctl-get-details: Retrieve full device list using cache ID (bypasses max limit)\n- simctl-device: Boot, shutdown, or manage specific simulators\n- simctl-app: Install and launch apps on simulators\n\n## Notes\n\n- Prevents token overflow (raw output = 10k+ tokens) via concise summaries and device limiting\n- Default max=5 limits output to ~2.5k tokens (90% reduction from full 50-device list)\n- 1-hour intelligent caching eliminates redundant queries\n- Shows booted devices and recently used simulators first in concise mode\n- Use simctl-get-details with cacheId for progressive access to full data (ignores max limit)\n- Device sorting: mostRecent (with lastUsed) \u2192 oldest (with lastUsed) \u2192 unknown (no lastUsed)\n- Smart filtering by device type, runtime, and availability\n- Essential: Use this instead of 'xcrun simctl list' for better performance\n";
export declare const SIMCTL_LIST_DOCS_MINI = "List iOS simulators with caching. Use rtfm({ toolName: \"simctl-list\" }) for docs.";
//# sourceMappingURL=list.d.ts.map