Skip to main content
Glama
XC-MCP: XCode CLI wrapper

XC-MCP: XCode CLI wrapper

by conorluddy

Start Hang Capture

hang-start

Starts a HangBuster capture session by streaming simulator logs for hang, stall, watchdog, and jetsam events, enabling you to reproduce an issue before parsing and ranking captured results.

Instructions

hang-start

Begin a HangBuster capture session. Spawns a detached simctl log stream filtered to hang/stall/watchdog/jetsam events, writing to the session's raw log. Reproduce the hang, then call hang-stop to parse, cluster, and rank the results.

Parameters

  • rawCapture (optional): capture all NDJSON log records, skip clustering, and gzip at stop

  • noGzip (optional): keep raw capture uncompressed

  • udid (optional): simulator UDID (default: booted)

  • predicate (optional): override the os_log predicate

  • minHangMs (optional, default 250): drop hang events shorter than this at stop time

Returns

sessionId (pass to hang-stop / hang-get-details), pid, and guidance.

Tool call template

This tool declares no required parameters. Add optional parameters from the input schema as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {},
    "name": "hang-start"
  }
}

Input Schema

NameRequiredDescriptionDefault
udidNo
noGzipNo
minHangMsNo
predicateNo
rawCaptureNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed3 schema fields changedv5.0.0
    • addedInput schema / properties / minHangMs / minimum
      Added value: +0
    • addedInput schema / properties / noGzip
      Added value: +{
      +  "type": "boolean"
      +}
    • addedInput schema / properties / rawCapture
      Added value: +{
      +  "type": "boolean"
      +}
  2. Addedv4.1.0

TDQS

A4.4/5.0
Behavior4/5

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

Beyond the annotations (which already signal non-read-only, non-idempotent, non-destructive), the description discloses that a detached background process is spawned, that output is written to a session raw log, and that compression occurs at stop time. It does not say what happens to an orphaned session if `hang-stop` is never called, which is the main unstated side effect of a spawned-process tool.

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?

Front-loaded lead sentence followed by a Parameters section and a Returns line — a clean, scannable structure with no filler. Minor waste in the redundant leading `# hang-start` heading that merely restates the tool name and title.

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 five-parameter, no-output-schema tool, the description covers the mechanism, the full parameter set, the expected agent workflow, and the shape of the return value (`sessionId`, pid, guidance) with a pointer to the follow-up tool. An agent has everything needed to invoke it correctly and act on 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 0%, so the description carries the full burden and it largely delivers, documenting all five parameters with defaults (`minHangMs` 250, `udid` booted) and behavioral consequences (`minHangMs` filters at stop, not at capture). Gaps remain: the expected format for `predicate` is unspecified, and it does not state that `noGzip` is only meaningful when `rawCapture` is set.

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?

States a specific verb and resource ("Begin a HangBuster capture session") and immediately explains the mechanism: a detached `simctl log stream` filtered to hang/stall/watchdog/jetsam events written to the session's raw log. This makes it clearly distinguishable from `hang-stop`, `hang-get-details`, and `simctl-stream-logs`.

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

Usage Guidelines4/5

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

Provides a clear lifecycle instruction — start the capture, reproduce the hang, then call `hang-stop` to parse, cluster, and rank — and notes the `rawCapture` path skips clustering. It does not say when to prefer this over the sibling `simctl-stream-logs` for general log streaming, so the alternative-selection guidance is incomplete but the primary workflow is unambiguous.

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