xc-mcp
Version:
MCP server that wraps Xcode command-line tools for iOS/macOS development workflows
62 lines • 4.5 kB
TypeScript
interface IdbTargetsArgs {
operation: 'list' | 'describe' | 'focus';
udid?: string;
state?: 'Booted' | 'Shutdown';
type?: 'device' | 'simulator';
}
/**
* Query and manage iOS targets - discover simulators and physical devices available for testing
*
* **What it does:**
* Provides discovery and management for all iOS targets (simulators and devices) connected via IDB.
* Lists available targets with filtering by state (booted/shutdown) and type (device/simulator), retrieves
* detailed target metadata including screen dimensions for coordinate validation, and focuses simulator
* windows for interactive testing. Uses intelligent caching (IDBTargetCache) to avoid expensive IDB calls.
*
* **Why you'd use it:**
* - Discover available targets before starting automation workflows - no manual UDID lookup required
* - Filter booted targets for immediate testing vs. shutdown targets that need activation
* - Get screen dimensions for coordinate transformation and tap validation in UI automation
* - Focus simulator windows programmatically during multi-target test execution
*
* **Parameters:**
* - operation (required): "list" | "describe" | "focus"
* - udid (required for describe/focus): Target identifier
* - state (optional, list only): "Booted" | "Shutdown" - filter by target state
* - type (optional, list only): "device" | "simulator" - filter by target type
*
* **Returns:**
* Structured target data with success status, summary counts, target arrays (booted/shutdown),
* usage statistics (last used time, successful operations count), cache diagnostics, and
* actionable guidance for next steps in automation workflow.
*
* **Example:**
* ```typescript
* // List all booted targets ready for testing
* const result = await idbTargetsTool({
* operation: 'list',
* state: 'Booted'
* });
*
* // Get detailed target info with screen dimensions
* const details = await idbTargetsTool({
* operation: 'describe',
* udid: 'ABC-123-DEF'
* });
* ```
*
* **Full documentation:** See idb/targets.md for detailed parameters and operations
*
* @param args Tool arguments with operation type and optional filters
* @returns Tool result with structured target information and guidance
*/
export declare function idbTargetsTool(args: IdbTargetsArgs): Promise<{
content: {
type: "text";
text: string;
}[];
isError: boolean;
}>;
export declare const IDB_TARGETS_DOCS = "\n# idb-targets\n\n**Query and manage iOS targets** - discover simulators and physical devices available for testing\n\n## What it does\n\nProvides discovery and management for all iOS targets (simulators and devices) connected via IDB. Lists available targets with filtering by state (booted/shutdown) and type (device/simulator), retrieves detailed target metadata including screen dimensions for coordinate validation, and focuses simulator windows for interactive testing. Uses intelligent caching (IDBTargetCache) to avoid expensive IDB calls.\n\n## Why you'd use it\n\n- Discover available targets before starting automation workflows - no manual UDID lookup required\n- Filter booted targets for immediate testing vs. shutdown targets that need activation\n- Get screen dimensions for coordinate transformation and tap validation in UI automation\n- Focus simulator windows programmatically during multi-target test execution\n\n## Parameters\n\n### Required\n- **operation** (string): \"list\" | \"describe\" | \"focus\"\n\n### Operation-specific parameters\n- **udid** (string, required for describe/focus): Target identifier\n- **state** (string, optional for list): \"Booted\" | \"Shutdown\" - filter by target state\n- **type** (string, optional for list): \"device\" | \"simulator\" - filter by target type\n\n## Returns\n\nStructured target data with success status, summary counts, target arrays (booted/shutdown), usage statistics (last used time, successful operations count), cache diagnostics, and actionable guidance for next steps in automation workflow.\n\n## Examples\n\n### List all booted targets\n```typescript\nconst result = await idbTargetsTool({\n operation: 'list',\n state: 'Booted'\n});\n```\n\n### Get detailed target info\n```typescript\nconst details = await idbTargetsTool({\n operation: 'describe',\n udid: 'ABC-123-DEF'\n});\n```\n\n## Related Tools\n\n- idb-connect: Establish companion connection to target\n- idb-list-apps: List apps on target\n";
export {};
//# sourceMappingURL=targets.d.ts.map