Skip to main content
Glama

open_simulator

Launch the iOS Simulator application to test and debug mobile apps in a virtual environment.

Instructions

Opens the iOS Simulator application

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Implementation Reference

  • src/index.ts:191-223 (registration)
    Registration of the 'open_simulator' tool using server.tool(), conditional on not being filtered. Includes the inline handler function.
    if (!isToolFiltered("open_simulator")) { server.tool( "open_simulator", "Opens the iOS Simulator application", async () => { try { await run("open", ["-a", "Simulator.app"]); return { isError: false, content: [ { type: "text", text: "Simulator.app opened successfully", }, ], }; } catch (error) { return { isError: true, content: [ { type: "text", text: errorWithTroubleshooting( `Error opening Simulator.app: ${toError(error).message}` ), }, ], }; } } ); }
  • The handler function for 'open_simulator' that executes 'open -a Simulator.app' via the run helper and returns a success or error response.
    async () => { try { await run("open", ["-a", "Simulator.app"]); return { isError: false, content: [ { type: "text", text: "Simulator.app opened successfully", }, ], }; } catch (error) { return { isError: true, content: [ { type: "text", text: errorWithTroubleshooting( `Error opening Simulator.app: ${toError(error).message}` ), }, ], }; } }
  • Helper function 'run' used by the open_simulator handler to execute shell commands.
    async function run( cmd: string, args: string[] ): Promise<{ stdout: string; stderr: string }> { const { stdout, stderr } = await execFileAsync(cmd, args, { shell: false }); return { stdout: stdout.trim(), stderr: stderr.trim(), }; }
  • Helper function to check if a tool is filtered out via environment variable.
    function isToolFiltered(toolName: string): boolean { return FILTERED_TOOLS.includes(toolName); }

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

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