Skip to main content
Glama
atom2ueki

MCP Server for iOS Simulator

boot-simulator-by-udid

Boot iOS simulators using their unique device identifier (UDID) with the MCP Server for iOS Simulator. Simplifies programmatic control and management of iOS simulators through standardized interfaces.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
udidYes

Implementation Reference

  • Registers the 'boot-simulator-by-udid' tool in the MCP server, defining its input schema (udid: string) and thin handler that calls simulatorManager.bootByUDID and formats the response.
    this.server.tool(
      'boot-simulator-by-udid',
      {
        udid: z.string()
      },
      async (params) => {
        fileLogger.info(`Booting simulator directly by UDID: ${params.udid}`);
        try {
          const result = await simulatorManager.bootByUDID(params.udid);
          if (result) {
            return {
              content: [{
                type: 'text',
                text: `Successfully booted simulator with UDID: ${params.udid}`
              }]
            };
          } else {
            return {
              content: [{
                type: 'text',
                text: `Failed to boot simulator with UDID: ${params.udid}`
              }],
              isError: true
            };
          }
        } catch (error) {
          fileLogger.error(`Failed to boot simulator by UDID: ${params.udid}`, { error });
          return {
            content: [{
              type: 'text',
              text: `Error: ${error instanceof Error ? error.message : String(error)}`
            }],
            isError: true
          };
        }
      }
    );
  • Zod schema for the tool input: requires a 'udid' string parameter.
      udid: z.string()
    },
  • Main handler logic: validates simulator exists by UDID, checks if already booted, boots using appium-ios-simulator.getSimulator(udid).run(), waits and verifies boot status via getBootedSimulators.
    async bootByUDID(udid: string): Promise<boolean> {
      fileLogger.info(`Booting simulator with UDID: ${udid}`);
      
      try {
        // First check if a simulator with this UDID exists
        const allSimulators = await this.getAllSimulators();
        const simulator = allSimulators.find(sim => sim.udid === udid);
        
        if (!simulator) {
          fileLogger.error(`No simulator found with UDID: ${udid}`);
          return false;
        }
        
        // Check if the simulator is already booted
        const bootedSimulators = await this.getBootedSimulators();
        const isAlreadyBooted = bootedSimulators.some(sim => sim.udid === udid);
        
        if (isAlreadyBooted) {
          fileLogger.info(`Simulator with UDID ${udid} is already booted`);
          return true;
        }
        
        // Get a simulator instance from appium-ios-simulator
        const simulatorInstance = await getSimulator(udid);
        
        // Boot the simulator
        fileLogger.info(`Running simulator with UDID: ${udid}`);
        await simulatorInstance.run();
        
        // Verify the simulator has booted
        await new Promise(resolve => setTimeout(resolve, 2000)); // Wait for simulator to register as booted
        const newBootedSimulators = await this.getBootedSimulators();
        const didBoot = newBootedSimulators.some(sim => sim.udid === udid);
        
        if (didBoot) {
          fileLogger.info(`Successfully booted simulator with UDID: ${udid}`);
          return true;
        } else {
          fileLogger.error(`Simulator with UDID ${udid} did not register as booted after run() command`);
          return false;
        }
      } catch (error) {
        fileLogger.error(`Failed to boot simulator with UDID: ${udid}`, { error });
        return false;
      }
    }
Behavior1/5

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

Tool has no description.

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

Conciseness1/5

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

Tool has no description.

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

Completeness1/5

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

Tool has no description.

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

Parameters1/5

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

Tool has no description.

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

Purpose1/5

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

Tool has no description.

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

Usage Guidelines1/5

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

Tool has no description.

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

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/atom2ueki/mcp-server-ios-simulator'

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