boot_sim
Launches an iOS simulator by specifying its UUID using the boot_sim tool on the XcodeBuildMCP server. Ensures quick setup for testing and development tasks.
Instructions
Boots an iOS simulator. IMPORTANT: You MUST provide the simulatorUuid parameter. Example: boot_sim({ simulatorUuid: 'YOUR_UUID_HERE' })
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| simulatorUuid | Yes | UUID of the simulator to use (obtained from list_simulators) |
Input Schema (JSON Schema)
{
"$schema": "http://json-schema.org/draft-07/schema#",
"additionalProperties": false,
"properties": {
"simulatorUuid": {
"description": "UUID of the simulator to use (obtained from list_simulators)",
"type": "string"
}
},
"required": [
"simulatorUuid"
],
"type": "object"
}
Implementation Reference
- The main handler function that executes the boot_sim tool logic by invoking 'xcrun simctl boot' on the given simulatorId and returning success/error responses.export async function boot_simLogic( params: BootSimParams, executor: CommandExecutor, ): Promise<ToolResponse> { log('info', `Starting xcrun simctl boot request for simulator ${params.simulatorId}`); try { const command = ['xcrun', 'simctl', 'boot', params.simulatorId]; const result = await executor(command, 'Boot Simulator', true); if (!result.success) { return { content: [ { type: 'text', text: `Boot simulator operation failed: ${result.error}`, }, ], }; } return { content: [ { type: 'text', text: `✅ Simulator booted successfully. To make it visible, use: open_sim() Next steps: 1. Open the Simulator app (makes it visible): open_sim() 2. Install an app: install_app_sim({ simulatorId: "${params.simulatorId}", appPath: "PATH_TO_YOUR_APP" }) 3. Launch an app: launch_app_sim({ simulatorId: "${params.simulatorId}", bundleId: "YOUR_APP_BUNDLE_ID" })`, }, ], }; } catch (error) { const errorMessage = error instanceof Error ? error.message : String(error); log('error', `Error during boot simulator operation: ${errorMessage}`); return { content: [ { type: 'text', text: `Boot simulator operation failed: ${errorMessage}`, }, ], }; } }
- Zod schema definition for boot_sim parameters (simulatorId) and public schema (empty after omitting simulatorId).const bootSimSchemaObject = z.object({ simulatorId: z.string().describe('UUID of the simulator to use (obtained from list_sims)'), }); type BootSimParams = z.infer<typeof bootSimSchemaObject>; const publicSchemaObject = bootSimSchemaObject .omit({ simulatorId: true, } as const) .strict();
- src/mcp/tools/simulator/boot_sim.ts:68-78 (registration)Tool registration exporting the boot_sim tool with name, description, schema, and wrapped handler.export default { name: 'boot_sim', description: 'Boots an iOS simulator.', schema: publicSchemaObject.shape, handler: createSessionAwareTool<BootSimParams>({ internalSchema: bootSimSchemaObject, logicFunction: boot_simLogic, getExecutor: getDefaultCommandExecutor, requirements: [{ allOf: ['simulatorId'], message: 'simulatorId is required' }], }), };