Skip to main content
Glama

launch_app_logs_sim

Launch an app in an iOS simulator and capture its logs for debugging and testing purposes.

Instructions

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

Input Schema

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

Implementation Reference

  • Registration of the 'launch_app_logs_sim' tool, including input schema (simulatorUuid, bundleId, optional args), handler that validates parameters, starts log capture with console enabled using startLogCapture helper, and returns the log session ID for further use.
    export function registerLaunchAppWithLogsInSimulatorTool(server: McpServer): void { server.tool( 'launch_app_logs_sim', 'Launches an app in an iOS simulator and captures its logs.', { simulatorUuid: z .string() .describe('UUID of the simulator to use (obtained from list_simulators)'), 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'), }, async (params): Promise<ToolResponse> => { const simulatorUuidValidation = validateRequiredParam('simulatorUuid', params.simulatorUuid); if (!simulatorUuidValidation.isValid) { return simulatorUuidValidation.errorResponse!; } const bundleIdValidation = validateRequiredParam('bundleId', params.bundleId); if (!bundleIdValidation.isValid) { return bundleIdValidation.errorResponse!; } log('info', `Starting app launch with logs for simulator ${params.simulatorUuid}`); // Start log capture session const { sessionId, error } = await startLogCapture({ simulatorUuid: params.simulatorUuid, bundleId: params.bundleId, captureConsole: true, }); if (error) { return { content: [createTextContent(`App was launched but log capture failed: ${error}`)], isError: true, }; } return { content: [ createTextContent( `App launched successfully in simulator ${params.simulatorUuid} 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.`, ), ], }; }, ); }

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

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