Skip to main content
Glama
andreahaku
by andreahaku

simulator.boot

Start an iOS simulator device for testing React Native/Expo applications. This tool launches the configured simulator to enable development workflows.

Instructions

Boot an iOS simulator device

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
deviceNoDevice name or UDID. Defaults to config defaultDeviceName.

Implementation Reference

  • Core handler function that boots the specified iOS simulator device using simctl boot command, handles already booted state, updates global state manager
    export async function bootDevice(nameOrUdid: string): Promise<SimulatorDevice> { logger.info("simulator", `Booting simulator: ${nameOrUdid}`); const device = await findDevice(nameOrUdid); if (!device) { throw createError("SIM_NOT_FOUND", `Simulator not found: ${nameOrUdid}`, { details: "Use simulator.list_devices to see available simulators", }); } if (device.state === "Booted") { logger.info("simulator", `Device ${device.name} is already booted`); stateManager.updateSimulator({ state: "booted", udid: device.udid, deviceName: device.name, }); return device; } stateManager.updateSimulator({ state: "booting", udid: device.udid, deviceName: device.name }); const result = await simctl(["boot", device.udid], { timeoutMs: 120000 }); if (result.exitCode !== 0) { stateManager.updateSimulator({ state: "unknown" }); const { code, message } = parseSimctlError(result.stderr); throw createError(code, message, { details: result.stderr }); } stateManager.updateSimulator({ state: "booted" }); logger.info("simulator", `Device ${device.name} booted successfully`); return { ...device, state: "Booted" }; }
  • Zod input schema defining optional 'device' parameter for simulator.boot tool
    export const SimulatorBootInputSchema = z.object({ device: z.string().optional().describe("Device name or UDID. Defaults to config defaultDeviceName."), });
  • MCP server registration of 'simulator.boot' tool, including input schema reference and thin async handler wrapper that delegates to bootDevice and formats MCP response
    server.tool( "simulator.boot", "Boot an iOS simulator device", SimulatorBootInputSchema.shape, async (args) => { try { const device = args.device ?? (hasConfig() ? getConfig().defaultDeviceName : "iPhone 15"); const result = await bootDevice(device); return { content: [ { type: "text", text: JSON.stringify({ success: true, device: result, state: stateManager.getSimulator(), }, null, 2), }, ], }; } catch (error) { return handleToolError(error); } } );

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/andreahaku/expo_ios_development_mcp'

If you have feedback or need assistance with the MCP directory API, please join our Discord server