Skip to main content
Glama

native-profiler-launch-analysis

Measure iOS app launch time or profile startup CPU work to set a baseline, verify a fix, and find what slows the first frame. Requires an installed Release build; it does not build or install the app.

Instructions

Profile or measure iOS app startup. Both modes open the app once, then time the launches that follow.

  • measure: time five launches with Argent's XCTest runner to set a baseline or verify a fix. On an iPhone the runner must be signed. The metric includes the first frame and any extended launch tasks.

  • profile: record one Instruments App Launch trace to find the CPU work before the first frame. Work after the first frame is not included. On a simulator there are no lifecycle phases and the launch time is a rough estimate. Install a Release build of bundle_id before calling; the tool does not build or install the app. Use when you need the iOS launch time or want to find what slows the app's startup. Returns samplesCollected in measure mode. In profile mode, launchMs runs from the first lifecycle phase after Process Creation to the first frame (null on a simulator); follow profilerSession.next to load the CPU samples with profiler-load and query them with profiler-stack-query. Fails if the app is not installed or no iPhone or allowed simulator is available.

Tool call template

Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {
      "mode": "<mode>",
      "bundle_id": "<bundle_id>"
    },
    "name": "native-profiler-launch-analysis"
  }
}

Input Schema

NameRequiredDescriptionDefault
modeYesmeasure: time five launches with XCTest. profile: record one Instruments App Launch trace.
bundle_idYesBundle ID of the Release build already installed on the device. The tool does not build or install the app.
device_idNoConnected iPhone UDID; required for a physical-device run. With allow_simulator, a booted simulator UDID also works.
allow_simulatorNoExplicitly allow a booted simulator when no iPhone is selected. Default: false.
duration_secondsNoprofile mode only: App Launch trace recording length in seconds (default 8). Rejected in measure mode. Range: 5 to 60.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Added

TDQS

A4.8/5.0
Behavior5/5

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

With no annotations, the description carries the full burden and does so: it discloses that both modes open the app once and only time subsequent launches, that the XCTest runner must be signed on an iPhone, what the metric includes (first frame plus extended launch tasks), simulator limitations (no lifecycle phases, rough estimate), and the failure conditions (app not installed, no iPhone or allowed simulator).

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

Purpose and mode bullets are front-loaded and each bullet earns its place, so the length is justified by real behavioral content. Minor redundancy remains, such as repeating in prose what the bundle_id schema already says about not building or installing the app.

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

Completeness5/5

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

For a two-mode tool with no output schema, the description covers prerequisites, per-mode semantics, return values (samplesCollected, launchMs with its simulator null case, profilerSession.next), follow-up calls, and failure modes. An agent has everything needed to call it correctly and interpret the result.

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

Parameters4/5

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

Schema coverage is 100%, so the baseline is 3, but the description adds real meaning beyond the enum text: measure times five launches, profile records a single trace, and profile-mode numbers behave differently on simulator versus device. The only untouched parameter is duration_seconds, which the schema already fully documents with its 5-60 range and measure-mode rejection.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

The opening sentence names the specific verb and resource ('Profile or measure iOS app startup') and immediately splits the tool into two named modes with distinct semantics. An agent can distinguish it from native-profiler-start/stop and profiler-load without opening the schema.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines5/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

It states when to use the tool ('when you need the iOS launch time or want to find what slows the app's startup') and routes between modes explicitly: measure to set a baseline or verify a fix, profile to find CPU work before the first frame. It also states the precondition (install a Release build; the tool will not build or install) and hands off to profiler-load and profiler-stack-query for follow-up.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.