xcode_stop
Stop the current build or scheme action in Xcode for a specified project file to halt ongoing processes.
Instructions
Stop the current scheme action for a specific project
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| xcodeproj | Yes | Absolute path to the .xcodeproj file (or .xcworkspace if available) - e.g., /path/to/project.xcodeproj |
Implementation Reference
- src/tools/BuildTools.ts:1210-1222 (handler)Core handler function that executes the JXA script to invoke Xcode's workspace.stop() method, stopping the current build/run/test action.public static async stop(projectPath: string): Promise<McpResult> { const script = ` (function() { ${getWorkspaceByPathScript(projectPath)} workspace.stop(); return 'Stop command sent'; })() `; const result = await JXAExecutor.execute(script); return { content: [{ type: 'text', text: result }] }; }
- src/XcodeServer.ts:479-483 (handler)MCP server dispatch handler in CallToolRequestSchema switch statement that validates input and delegates to BuildTools.stop.case 'xcode_stop': if (!args.xcodeproj) { return { content: [{ type: 'text', text: 'Error: xcodeproj parameter is required' }] }; } return await BuildTools.stop(args.xcodeproj as string);
- Tool schema definition providing name, description, and input validation schema (requires xcodeproj path).{ name: 'xcode_stop', description: 'Stop the current scheme action for a specific project', inputSchema: { type: 'object', properties: { xcodeproj: { type: 'string', description: preferredXcodeproj ? `Absolute path to the .xcodeproj file (or .xcworkspace if available) - defaults to ${preferredXcodeproj}` : 'Absolute path to the .xcodeproj file (or .xcworkspace if available) - e.g., /path/to/project.xcodeproj', }, }, required: preferredXcodeproj ? [] : ['xcodeproj'], }, },
- src/XcodeServer.ts:301-319 (registration)Registers xcode_stop tool (via getToolDefinitions) for the MCP ListToolsRequestSchema, making it discoverable by clients.this.server.setRequestHandler(ListToolsRequestSchema, async () => { const toolOptions: { includeClean: boolean; preferredScheme?: string; preferredXcodeproj?: string; } = { includeClean: this.includeClean }; if (this.preferredScheme) toolOptions.preferredScheme = this.preferredScheme; if (this.preferredXcodeproj) toolOptions.preferredXcodeproj = this.preferredXcodeproj; const toolDefinitions = getToolDefinitions(toolOptions); return { tools: toolDefinitions.map(tool => ({ name: tool.name, description: tool.description, inputSchema: tool.inputSchema })), }; });