Skip to main content
Glama

ios_list_simulators

Lists available iOS simulators for development and testing. Use this tool to view and select simulators for running iOS applications.

Instructions

List available iOS simulators

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Implementation Reference

  • The handler function for 'ios_list_simulators' tool. It checks macOS platform, executes 'xcrun simctl list devices --json', parses the output, extracts simulator details (UDID, name, state, runtime, etc.), computes counts, and returns structured data.
    tools.set('ios_list_simulators', {
      name: 'ios_list_simulators',
      description: 'List available iOS simulators',
      inputSchema: {
        type: 'object',
        properties: {},
        required: []
      },
      handler: async () => {
        checkMacOS();
    
        const result = await processExecutor.execute('xcrun', ['simctl', 'list', 'devices', '--json']);
        
        if (result.exitCode !== 0) {
          throw new Error(`Failed to list iOS simulators: ${result.stderr}`);
        }
    
        let devicesData;
        try {
          devicesData = JSON.parse(result.stdout);
        } catch (parseError) {
          throw new Error(`Failed to parse simulator list JSON: ${parseError}`);
        }
    
        const simulators = [];
        const devices = devicesData.devices || {};
    
        for (const [runtime, deviceList] of Object.entries(devices)) {
          if (Array.isArray(deviceList)) {
            for (const device of deviceList as any[]) {
              simulators.push({
                udid: device.udid,
                name: device.name,
                state: device.state,
                runtime: runtime.replace('com.apple.CoreSimulator.SimRuntime.', ''),
                deviceTypeIdentifier: device.deviceTypeIdentifier,
                isAvailable: device.isAvailable || false,
              });
            }
          }
        }
    
        return {
          success: true,
          data: {
            simulators,
            totalCount: simulators.length,
            bootedCount: simulators.filter((s: any) => s.state === 'Booted').length,
            availableCount: simulators.filter((s: any) => s.isAvailable).length,
          },
        };
      }
    });
  • Input schema for ios_list_simulators tool, which takes no parameters (empty object).
    inputSchema: {
      type: 'object',
      properties: {},
      required: []
    },
  • Local registration of the tool in the createIOSTools factory function, which returns a Map added to the main tools registry in server.ts.
    tools.set('ios_list_simulators', {
      name: 'ios_list_simulators',
      description: 'List available iOS simulators',
      inputSchema: {
        type: 'object',
        properties: {},
        required: []
      },
      handler: async () => {
        checkMacOS();
    
        const result = await processExecutor.execute('xcrun', ['simctl', 'list', 'devices', '--json']);
        
        if (result.exitCode !== 0) {
          throw new Error(`Failed to list iOS simulators: ${result.stderr}`);
        }
    
        let devicesData;
        try {
          devicesData = JSON.parse(result.stdout);
        } catch (parseError) {
          throw new Error(`Failed to parse simulator list JSON: ${parseError}`);
        }
    
        const simulators = [];
        const devices = devicesData.devices || {};
    
        for (const [runtime, deviceList] of Object.entries(devices)) {
          if (Array.isArray(deviceList)) {
            for (const device of deviceList as any[]) {
              simulators.push({
                udid: device.udid,
                name: device.name,
                state: device.state,
                runtime: runtime.replace('com.apple.CoreSimulator.SimRuntime.', ''),
                deviceTypeIdentifier: device.deviceTypeIdentifier,
                isAvailable: device.isAvailable || false,
              });
            }
          }
        }
    
        return {
          success: true,
          data: {
            simulators,
            totalCount: simulators.length,
            bootedCount: simulators.filter((s: any) => s.state === 'Booted').length,
            availableCount: simulators.filter((s: any) => s.isAvailable).length,
          },
        };
      }
    });
  • src/server.ts:61-72 (registration)
    Global MCP server registration loop that includes 'ios_list_simulators' from iosTools Map into the main server tools Map.
    for (const toolName of Object.keys(TOOL_REGISTRY)) {
      if (allAvailableTools.has(toolName)) {
        tools.set(toolName, allAvailableTools.get(toolName));
      } else if (toolName === 'health_check') {
        // health_check is handled separately below
        continue;
      } else {
        // Tool is in registry but not implemented - log warning
        console.warn(`Warning: Tool '${toolName}' is in TOOL_REGISTRY but not implemented`);
      }
    }
  • Metadata/schema in TOOL_REGISTRY defining category, platform, requirements (XCRUN), and performance expectations for the tool.
    'ios_list_simulators': {
      name: 'ios_list_simulators',
      category: ToolCategory.ESSENTIAL,
      platform: 'ios',
      requiredTools: [RequiredTool.XCRUN],
      description: 'List available iOS simulators',
      safeForTesting: true,
      performance: { expectedDuration: 150, timeout: 10000 }
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. While 'List' implies a read-only operation, it doesn't specify whether this requires specific permissions, how the data is formatted (e.g., JSON list, table), if there are rate limits, or what happens if no simulators are available. For a tool with zero annotation coverage, this leaves significant gaps in understanding its 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 a single, efficient sentence that directly states the tool's purpose without any fluff. It's front-loaded with the core action ('List') and resource ('iOS simulators'), making it immediately scannable. Every word earns its place, and there's no redundancy or wasted verbiage.

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

Completeness3/5

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

Given the tool's low complexity (0 parameters, no annotations, no output schema), the description is minimally adequate. It states what the tool does but lacks context about behavioral traits, output format, or integration with sibling tools. Without annotations or an output schema, the description should ideally provide more guidance on what to expect, but it meets the bare minimum for such a simple tool.

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

Parameters4/5

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

The tool has 0 parameters, and schema description coverage is 100%, so there are no parameters to document. The description doesn't need to compensate for any parameter gaps, and it correctly implies no inputs are required. A baseline of 4 is appropriate since the description aligns with the empty schema without adding unnecessary detail.

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

Purpose4/5

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

The description 'List available iOS simulators' clearly states the verb ('List') and resource ('iOS simulators'), making the purpose immediately understandable. It distinguishes from sibling tools like 'ios_boot_simulator' and 'ios_shutdown_simulator' by focusing on listing rather than controlling simulators. However, it doesn't specify the scope (e.g., all simulators vs. only booted ones) which prevents a perfect score.

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?

The description provides no guidance on when to use this tool versus alternatives. It doesn't mention prerequisites (e.g., whether Xcode must be installed), differentiate from similar tools like 'flutter_list_devices' or 'native_run_list_devices', or indicate when this tool is preferred over others. The agent must infer usage from the tool name alone.

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/cristianoaredes/mcp-mobile-server'

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