UNPKG

xc-mcp

Version:

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

52 lines 3.72 kB
/** * List targets, schemes, and configurations for Xcode projects with intelligent caching * * **What it does:** * Discovers and returns all available build targets, schemes, and configurations for an Xcode * project or workspace. Uses 1-hour intelligent caching to remember results and avoid expensive * re-runs of project discovery. Validates both Xcode installation and project path before * execution to provide clear error messages if something is misconfigured. * * **Why you'd use it:** * - Discover available schemes before building or testing (essential for automation) * - Validate project structure and configuration * - Get structured project metadata for CI/CD pipelines * - Avoid expensive repeated queries with 1-hour caching * * **Parameters:** * - projectPath (string, required): Path to .xcodeproj or .xcworkspace file * - outputFormat (string, optional): "json" (default) or "text" output format * * **Returns:** * Structured JSON containing all targets, schemes, configurations, and project information. * Consistent format across .xcodeproj and .xcworkspace project types. Results are cached * for 1 hour to speed up subsequent queries. * * **Example:** * ```typescript * // List schemes for a project * const info = await xcodebuildListTool({ * projectPath: "/path/to/MyApp.xcodeproj" * }); * * // List with text output * const textInfo = await xcodebuildListTool({ * projectPath: "/path/to/MyApp.xcworkspace", * outputFormat: "text" * }); * ``` * * **Full documentation:** See src/tools/xcodebuild/list.md for detailed parameters * * @param args Tool arguments containing projectPath and outputFormat * @returns Tool result with project structure information */ export declare function xcodebuildListTool(args: any): Promise<{ content: { type: "text"; text: string; }[]; }>; export declare const XCODEBUILD_LIST_DOCS = "\n# xcodebuild-list\n\n\u26A1 **List project targets, schemes, and configurations** with intelligent caching\n\n## What it does\n\nDiscovers and returns all available build targets, schemes, and configurations for an Xcode project or workspace. Uses 1-hour intelligent caching to remember results and avoid expensive re-runs of project discovery. Validates both Xcode installation and project path before execution to provide clear error messages if something is misconfigured.\n\n## Why you'd use it\n\n- Discover available schemes before building or testing (essential for automation)\n- Validate project structure and configuration\n- Get structured project metadata for CI/CD pipelines\n- Avoid expensive repeated queries with 1-hour caching\n\n## Parameters\n\n### Required\n- **projectPath** (string): Path to .xcodeproj or .xcworkspace file\n\n### Optional\n- **outputFormat** (string, default: 'json'): \"json\" or \"text\" output format\n\n## Returns\n\nStructured JSON containing all targets, schemes, configurations, and project information. Consistent format across .xcodeproj and .xcworkspace project types. Results are cached for 1 hour to speed up subsequent queries.\n\n## Examples\n\n### List schemes for a project\n```typescript\nconst info = await xcodebuildListTool({\n projectPath: \"/path/to/MyApp.xcodeproj\"\n});\n```\n\n### List with text output\n```typescript\nconst textInfo = await xcodebuildListTool({\n projectPath: \"/path/to/MyApp.xcworkspace\",\n outputFormat: \"text\"\n});\n```\n\n## Related Tools\n\n- xcodebuild-build: Build discovered schemes\n- xcodebuild-test: Test discovered schemes\n"; export declare const XCODEBUILD_LIST_DOCS_MINI = "List project schemes and targets. Use rtfm({ toolName: \"xcodebuild-list\" }) for docs."; //# sourceMappingURL=list.d.ts.map