Skip to main content
Glama

start_sim_log_cap

Capture structured logs from a specified iOS simulator and app using UUID and bundle ID. Optional console output capture requires app relaunch. Returns a session ID for log tracking.

Instructions

Starts capturing logs from a specified simulator. Returns a session ID. By default, captures only structured logs.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
bundleIdYesBundle identifier of the app to capture logs for.
captureConsoleNoWhether to capture console output (requires app relaunch).
simulatorUuidYesUUID of the simulator to capture logs from (obtained from list_simulators).

Implementation Reference

  • The core handler function `start_sim_log_capLogic` that initiates log capture for the specified simulator and app using the `startLogCapture` utility.
    export async function start_sim_log_capLogic(
      params: StartSimLogCapParams,
      _executor: CommandExecutor = getDefaultCommandExecutor(),
      logCaptureFunction: typeof startLogCapture = startLogCapture,
    ): Promise<ToolResponse> {
      const captureConsole = params.captureConsole ?? false;
      const { sessionId, error } = await logCaptureFunction(
        {
          simulatorUuid: params.simulatorId,
          bundleId: params.bundleId,
          captureConsole,
        },
        _executor,
      );
      if (error) {
        return {
          content: [createTextContent(`Error starting log capture: ${error}`)],
          isError: true,
        };
      }
      return {
        content: [
          createTextContent(
            `Log capture started successfully. Session ID: ${sessionId}.\n\n${captureConsole ? 'Note: Your app was relaunched to capture console output.' : 'Note: Only structured logs are being captured.'}\n\nNext Steps:\n1.  Interact with your simulator and app.\n2.  Use 'stop_sim_log_cap' with session ID '${sessionId}' to stop capture and retrieve logs.`,
          ),
        ],
      };
    }
  • Zod schema defining input parameters for the tool: simulatorId (UUID), bundleId, optional captureConsole.
    const startSimLogCapSchema = z.object({
      simulatorId: z
        .string()
        .uuid()
        .describe('UUID of the simulator to capture logs from (obtained from list_simulators).'),
      bundleId: z.string().describe('Bundle identifier of the app to capture logs for.'),
      captureConsole: z
        .boolean()
        .optional()
        .describe('Whether to capture console output (requires app relaunch).'),
    });
  • Default export registering the tool with name, public schema (omitting simulatorId), description, and session-aware handler wrapping the logic function.
    export default {
      name: 'start_sim_log_cap',
      description:
        'Starts capturing logs from a specified simulator. Returns a session ID. By default, captures only structured logs.',
      schema: publicSchemaObject.shape, // MCP SDK compatibility
      handler: createSessionAwareTool<StartSimLogCapParams>({
        internalSchema: startSimLogCapSchema as unknown as z.ZodType<StartSimLogCapParams>,
        logicFunction: start_sim_log_capLogic,
        getExecutor: getDefaultCommandExecutor,
        requirements: [{ allOf: ['simulatorId'], message: 'simulatorId is required' }],
      }),
    };
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. It states the tool starts a log capture session and returns a session ID, but fails to mention critical behaviors such as whether this requires specific permissions, if it impacts simulator performance, how to stop the capture (hinted by sibling 'stop_sim_log_cap'), or what happens to existing logs. The default behavior note adds some value, but overall, it lacks essential operational details for a tool that initiates a persistent action.

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 front-loads the core action and outcome, followed by a default behavior note. Every part earns its place: it states what the tool does, what it returns, and a key behavioral trait without any redundant or vague language. This is appropriately sized and well-structured for quick comprehension.

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?

Given the complexity of starting a log capture session (a persistent, potentially resource-intensive operation), the description is incomplete. With no annotations and no output schema, it lacks details on permissions, side effects, how to manage the session (e.g., stopping it), or the format of returned data. The default behavior note is helpful but insufficient for a tool that likely requires careful handling in a workflow.

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%, meaning all parameters are documented in the schema. The description adds no additional parameter semantics beyond what the schema provides (e.g., it doesn't explain the implications of 'captureConsole' or how 'bundleId' relates to log capture). With high schema coverage, the baseline is 3, as the description doesn't compensate with extra insights but doesn't detract either.

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 action ('Starts capturing logs') and resource ('from a specified simulator'), with the specific outcome ('Returns a session ID') and default behavior ('By default, captures only structured logs'). It distinguishes from sibling tools like 'start_device_log_cap' by specifying 'simulator' rather than 'device', though it doesn't explicitly name alternatives. This is clear but lacks explicit sibling differentiation.

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 like 'start_device_log_cap' or 'launch_app_logs_sim', nor does it mention prerequisites such as needing a running simulator or app. It implies usage through context but offers no explicit when/when-not instructions, leaving the agent to infer based on tool names 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

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