Skip to main content
Glama

list_simulators

Retrieve all available iOS simulators and their current status, such as Booted or Shutdown, for device management and automation.

Instructions

List all available iOS simulators with their state (Booted, Shutdown, etc.)

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Implementation Reference

  • The handler function 'listSimulators' executes 'xcrun simctl list devices --json' and formats the available simulator data.
    private async listSimulators() {
      try {
        const { stdout } = await execAsync('xcrun simctl list devices --json');
        const data = JSON.parse(stdout) as { devices: Record<string, SimulatorDevice[]> };
    
        const simulators: Array<{ runtime: string } & SimulatorDevice> = [];
        for (const [runtime, devices] of Object.entries(data.devices)) {
          for (const device of devices) {
            if (device.isAvailable) {
              simulators.push({
                runtime: runtime.replace('com.apple.CoreSimulator.SimRuntime.', ''),
                udid: device.udid,
                name: device.name,
                state: device.state,
                isAvailable: device.isAvailable,
              });
            }
          }
        }
    
        const booted = simulators.filter((s) => s.state === 'Booted');
        return {
          content: [{
            type: 'text',
            text: JSON.stringify({ booted: booted.length, simulators }, null, 2),
          }],
        };
      } catch (error: any) {
  • src/index.ts:279-283 (registration)
    Tool definition and registration for 'list_simulators' within 'setupToolHandlers'.
    {
      name: 'list_simulators',
      description: 'List all available iOS simulators with their state (Booted, Shutdown, etc.)',
      inputSchema: { type: 'object', properties: {}, additionalProperties: false },
    },

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/xmuweili/app-screen-mcp'

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