Skip to main content
Glama

launch_app_logs_sim

Launch an app in an iOS simulator by specifying its simulator UUID and bundle ID, then capture and analyze the app’s logs for debugging and development purposes.

Instructions

Launches an app in an iOS simulator and captures its logs.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
argsNoAdditional arguments to pass to the app
bundleIdYesBundle identifier of the app to launch (e.g., 'com.example.MyApp')
simulatorUuidYesUUID of the simulator to use (obtained from list_simulators)

Implementation Reference

  • The main handler function that launches the app in the specified iOS simulator with log capture enabled, returns session ID or error.
    export async function launch_app_logs_simLogic( params: LaunchAppLogsSimParams, executor: CommandExecutor = getDefaultCommandExecutor(), logCaptureFunction: LogCaptureFunction = startLogCapture, ): Promise<ToolResponse> { log('info', `Starting app launch with logs for simulator ${params.simulatorId}`); const captureParams = { simulatorUuid: params.simulatorId, bundleId: params.bundleId, captureConsole: true, ...(params.args && params.args.length > 0 ? { args: params.args } : {}), } as const; const { sessionId, error } = await logCaptureFunction(captureParams, executor); if (error) { return { content: [createTextContent(`App was launched but log capture failed: ${error}`)], isError: true, }; } return { content: [ createTextContent( `App launched successfully in simulator ${params.simulatorId} with log capture enabled.\n\nLog capture session ID: ${sessionId}\n\nNext Steps:\n1. Interact with your app in the simulator.\n2. Use 'stop_and_get_simulator_log({ logSessionId: "${sessionId}" })' to stop capture and retrieve logs.`, ), ], isError: false, }; }
  • Zod schema definition for tool parameters: simulatorId, bundleId, optional args. Includes public schema omitting simulatorId and inferred type.
    const launchAppLogsSimSchemaObject = z.object({ simulatorId: z.string().describe('UUID of the simulator to use (obtained from list_sims)'), bundleId: z .string() .describe("Bundle identifier of the app to launch (e.g., 'com.example.MyApp')"), args: z.array(z.string()).optional().describe('Additional arguments to pass to the app'), }); type LaunchAppLogsSimParams = z.infer<typeof launchAppLogsSimSchemaObject>; const publicSchemaObject = launchAppLogsSimSchemaObject .omit({ simulatorId: true, } as const) .strict();
  • Exports the tool registration object with name, description, schema, and session-aware handler.
    export default { name: 'launch_app_logs_sim', description: 'Launches an app in an iOS simulator and captures its logs.', schema: publicSchemaObject.shape, handler: createSessionAwareTool<LaunchAppLogsSimParams>({ internalSchema: launchAppLogsSimSchemaObject, logicFunction: launch_app_logs_simLogic, getExecutor: getDefaultCommandExecutor, requirements: [{ allOf: ['simulatorId'], message: 'simulatorId is required' }], }), };

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/cameroncooke/XcodeBuildMCP'

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