Skip to main content
Glama

open_sim

Launch the iOS Simulator directly from the XcodeBuildMCP server for testing and development purposes.

Instructions

Opens the iOS Simulator app.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Implementation Reference

  • The core handler function `open_simLogic` that implements the tool logic by executing the macOS shell command `open -a Simulator` to launch the iOS Simulator app. It handles success with helpful next steps and errors gracefully.
    export async function open_simLogic(
      params: OpenSimParams,
      executor: CommandExecutor,
    ): Promise<ToolResponse> {
      log('info', 'Starting open simulator request');
    
      try {
        const command = ['open', '-a', 'Simulator'];
        const result = await executor(command, 'Open Simulator', true);
    
        if (!result.success) {
          return {
            content: [
              {
                type: 'text',
                text: `Open simulator operation failed: ${result.error}`,
              },
            ],
          };
        }
    
        return {
          content: [
            {
              type: 'text',
              text: `Simulator app opened successfully`,
            },
            {
              type: 'text',
              text: `Next Steps:
    1. Boot a simulator if needed: boot_sim({ simulatorId: 'UUID_FROM_LIST_SIMULATORS' })
    2. Launch your app and interact with it
    3. Log capture options:
       - Option 1: Capture structured logs only (app continues running):
         start_sim_log_cap({ simulatorId: 'UUID', bundleId: 'YOUR_APP_BUNDLE_ID' })
       - Option 2: Capture both console and structured logs (app will restart):
         start_sim_log_cap({ simulatorId: 'UUID', bundleId: 'YOUR_APP_BUNDLE_ID', captureConsole: true })
       - Option 3: Launch app with logs in one step:
         launch_app_logs_sim({ simulatorId: 'UUID', bundleId: 'YOUR_APP_BUNDLE_ID' })`,
            },
          ],
        };
      } catch (error) {
        const errorMessage = error instanceof Error ? error.message : String(error);
        log('error', `Error during open simulator operation: ${errorMessage}`);
        return {
          content: [
            {
              type: 'text',
              text: `Open simulator operation failed: ${errorMessage}`,
            },
          ],
        };
      }
    }
  • Zod schema for the `open_sim` tool parameters. No parameters are required (empty object).
    const openSimSchema = z.object({});
  • Default export registering the `open_sim` tool with name, description, schema, and wrapped handler for MCP compatibility.
    export default {
      name: 'open_sim',
      description: 'Opens the iOS Simulator app.',
      schema: openSimSchema.shape, // MCP SDK compatibility
      handler: createTypedTool(openSimSchema, open_simLogic, getDefaultCommandExecutor),
    };
  • Re-export of the `open_sim` tool default export for use in the simulator-management module.
    export { default } from '../simulator/open_sim.ts';

Tool Definition Quality

Score is being calculated. Check back soon.

Install Server

Other Tools

Related 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/getsentry/XcodeBuildMCP'

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