Skip to main content
Glama

boot_simulator

Start an iOS simulator device to test and run Apple platform applications directly through Xcode development workflows.

Instructions

Boot a simulator

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
deviceIdYesDevice UDID or name of the simulator to boot

Implementation Reference

  • The execute method of BootSimulatorController, which implements the MCPController for 'boot_simulator'. Validates input, executes the use case, and formats the response or error.
    async execute(args: unknown): Promise<{ content: Array<{ type: string; text: string }> }> {
      try {
        // Cast to expected shape
        const input = args as { deviceId: unknown };
    
        // Create domain value object - will validate
        const deviceId = DeviceId.create(input.deviceId);
    
        // Create domain request
        const request = BootRequest.create(deviceId);
    
        // Execute use case
        const result = await this.useCase.execute(request);
        
        // Format response
        return {
          content: [{
            type: 'text',
            text: this.formatResult(result)
          }]
        };
      } catch (error: any) {
        // Handle validation and other errors consistently
        const message = ErrorFormatter.format(error);
        return {
          content: [{
            type: 'text',
            text: `❌ ${message}`
          }]
        };
      }
    }
  • Core use case execution logic for booting simulator: locates simulator, checks state, boots if necessary, handles errors.
    async execute(request: BootRequest): Promise<BootResult> {
      // Find the simulator
      const simulator = await this.simulatorLocator.findSimulator(request.deviceId);
      
      if (!simulator) {
        return BootResult.failed(
          request.deviceId,
          '',  // No name available since simulator wasn't found
          new SimulatorNotFoundError(request.deviceId)
        );
      }
      
      // Check simulator state
      if (simulator.state === SimulatorState.Booted) {
        return BootResult.alreadyBooted(
          simulator.id,
          simulator.name,
          {
            platform: simulator.platform,
            runtime: simulator.runtime
          }
        );
      }
      
      // Handle Booting state - simulator is already in the process of booting
      if (simulator.state === SimulatorState.Booting) {
        return BootResult.alreadyBooted(
          simulator.id,
          simulator.name,
          {
            platform: simulator.platform,
            runtime: simulator.runtime
          }
        );
      }
      
      // Handle ShuttingDown state - can't boot while shutting down
      if (simulator.state === SimulatorState.ShuttingDown) {
        return BootResult.failed(
          simulator.id,
          simulator.name,
          new SimulatorBusyError(SimulatorState.ShuttingDown)
        );
      }
      
      // Boot the simulator (handles Shutdown state)
      try {
        await this.simulatorControl.boot(simulator.id);
        
        return BootResult.booted(
          simulator.id,
          simulator.name,
          {
            platform: simulator.platform,
            runtime: simulator.runtime
          }
        );
      } catch (error: any) {
        return BootResult.failed(
          simulator.id,
          simulator.name,
          new BootCommandFailedError(error.stderr || error.message || '')
        );
      }
    }
  • Input schema definition for the boot_simulator tool, specifying the required 'deviceId' parameter.
    get inputSchema() {
      return {
        type: 'object' as const,
        properties: {
          deviceId: {
            type: 'string' as const,
            description: 'Device UDID or name of the simulator to boot'
          }
        },
        required: ['deviceId'] as const
      };
    }
  • src/index.ts:111-115 (registration)
    Registration loop that adds BootSimulatorController (created via factory at line 82) to the tools map by name.
    // Register each tool by its name
    for (const tool of toolInstances) {
      const definition = tool.getToolDefinition();
      this.tools.set(definition.name, tool);
    }
  • Factory that wires all dependencies to create the BootSimulatorController instance used for the tool.
    export class BootSimulatorControllerFactory {
      static create(): MCPController {
        // Create the shell executor that all adapters will use
        const execAsync = promisify(exec);
        const executor = new ShellCommandExecutorAdapter(execAsync);
    
        // Create infrastructure adapters
        const simulatorLocator = new SimulatorLocatorAdapter(executor);
        const simulatorControl = new SimulatorControlAdapter(executor);
    
        // Create the use case with all dependencies
        const useCase = new BootSimulatorUseCase(
          simulatorLocator,
          simulatorControl
        );
    
        // Create the controller
        const controller = new BootSimulatorController(useCase);
    
        // Create dependency checker
        const dependencyChecker = new DependencyChecker(executor);
    
        // Wrap with dependency checking decorator
        const decoratedController = new DependencyCheckingDecorator(
          controller,
          ['xcrun'],  // simctl is part of xcrun
          dependencyChecker
        );
    
        return decoratedController;
      }
Behavior2/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

No annotations are provided, so the description carries the full burden of behavioral disclosure. 'Boot a simulator' implies a state-changing action (starting a simulator), but it doesn't describe what happens during boot (e.g., loading an OS, requiring specific permissions, potential timeouts, or effects on other simulators). This leaves significant gaps in understanding the tool's behavior.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is extremely concise with 'Boot a simulator', a single phrase that front-loads the core action. There is no wasted language or unnecessary elaboration, making it efficient and easy to parse, though this conciseness contributes to gaps in other dimensions.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness2/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given the tool's complexity (a state-changing operation with no annotations and no output schema), the description is incomplete. It lacks details on behavioral traits, output expectations, error handling, and integration with sibling tools. The high schema coverage helps with parameters, but overall, the description doesn't provide enough context for effective use.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

The input schema has 100% description coverage, with the 'deviceId' parameter documented as 'Device UDID or name of the simulator to boot'. The description adds no additional meaning beyond this, as it doesn't elaborate on parameter usage or constraints. With high schema coverage, the baseline score of 3 is appropriate, as the description doesn't compensate but also doesn't detract.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose3/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description 'Boot a simulator' clearly states the action (boot) and target (simulator), but it's vague about what 'boot' entails (e.g., starting a virtual device) and doesn't differentiate from sibling tools like 'shutdown_simulator' or 'list_simulators'. It provides a basic purpose but lacks specificity and sibling distinction.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines2/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

No guidance is provided on when to use this tool versus alternatives. The description doesn't mention prerequisites (e.g., needing a simulator to be available), exclusions, or relationships to sibling tools like 'shutdown_simulator' for stopping or 'list_simulators' for selecting a device. Usage context is implied but not explicit.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Install Server

Other Tools

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/Stefan-Nitu/mcp-xcode'

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