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' }],
      }),
    };
Behavior2/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

With no annotations provided, the description carries full burden for behavioral disclosure. It states the tool performs two actions (launch and log capture) but doesn't describe what happens if the app fails to launch, how logs are captured/returned, whether this blocks until app exits, or what permissions/requirements exist. For a tool with potential side effects, this is insufficient.

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 states the core functionality without unnecessary words. It's appropriately sized for a tool with clear parameters and no complex edge cases needing explanation. Every word earns its place.

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

Completeness2/5

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

For a tool that launches apps and captures logs with no annotations and no output schema, the description is incomplete. It doesn't explain what format logs are returned in, whether this is a blocking operation, what happens on failure, or how to access captured logs. The combination of mutation behavior and lack of output documentation creates significant gaps.

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

Parameters3/5

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

Schema description coverage is 100%, so the schema already documents all three parameters thoroughly. The description doesn't add any parameter-specific information beyond what's in the schema descriptions. This meets the baseline expectation when schema does the heavy lifting, but doesn't provide extra context about parameter interactions.

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 clearly states the tool's purpose with specific verbs ('launches' and 'captures') and resources ('app in an iOS simulator' and 'logs'). It distinguishes from simpler launch tools like 'launch_app_sim' by adding the log capture functionality. However, it doesn't explicitly differentiate from 'launch_app_sim_name_ws' which might have similar capabilities.

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 when to choose this over 'launch_app_sim' (which likely doesn't capture logs) or 'launch_app_sim_name_ws' (which uses workspace instead of UUID). There's no mention of prerequisites like needing a booted simulator or installed app.

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

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

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