{"at":"2026-11-23T03:36:38.169Z","dir":"sent","era":"server_discover","message":{"id":1,"jsonrpc":"2.0","method":"server/discover","params":{"_meta":{"io.modelcontextprotocol/clientCapabilities":{},"io.modelcontextprotocol/clientInfo":{"name":"didrun-lab","version":"0.1.0"},"io.modelcontextprotocol/protocolVersion":"2026-07-28"}}}}
{"at":"2026-11-23T03:36:38.671Z","dir":"received","era":"server_discover","message":{"error":{"code":-32601,"message":"Method not found"},"id":1,"jsonrpc":"2.0"}}
{"at":"2026-11-23T03:36:38.772Z","dir":"sent","era":"initialize","message":{"id":1,"jsonrpc":"2.0","method":"initialize","params":{"capabilities":{},"clientInfo":{"name":"didrun-lab","version":"0.1.0"},"protocolVersion":"2025-11-25"}}}
{"at":"2026-11-23T03:36:39.295Z","dir":"received","era":"initialize","message":{"id":1,"jsonrpc":"2.0","result":{"capabilities":{"prompts":{"listChanged":true},"resources":{"listChanged":true},"tools":{"listChanged":true}},"protocolVersion":"2025-11-25","serverInfo":{"name":"memorydetective","version":"1.18.1"}}}}
{"at":"2026-11-23T03:36:39.295Z","dir":"sent","era":"initialize","message":{"jsonrpc":"2.0","method":"notifications/initialized"}}
{"at":"2026-11-23T03:36:39.295Z","dir":"sent","era":"initialize","message":{"id":2,"jsonrpc":"2.0","method":"tools/list","params":{}}}
{"at":"2026-11-23T03:36:39.302Z","dir":"received","era":"initialize","message":{"id":2,"jsonrpc":"2.0","result":{"tools":[{"description":"[mg.memory] Run `leaks(1)` against a `.memgraph` file (exported from Xcode Memory Graph Debugger) and return a structured summary: header info, totals, top-level ROOT CYCLE blocks with chain length, plain-English diagnosis. Set `fullChains: true` to also include the full nested retain forest.\n\nPipeline: → `classifyCycle` (named-antipattern + fix hint) → `reachableFromCycle` (scope blame to a single root). The response includes `suggestedNextCalls` so the agent can chain without re-reasoning.","execution":{"taskSupport":"forbidden"},"inputSchema":{"$schema":"http://json-schema.org/draft-07/schema#","additionalProperties":false,"properties":{"fullChains":{"default":false,"description":"When true, include the full nested retain chains in the response. Default false returns only top-level ROOT CYCLE summaries to keep payloads small.","type":"boolean"},"maxClassesInChain":{"default":10,"description":"Cap on how many unique class names to surface per cycle's `classesInChain` array. Default 10, enough to identify app-level types without flooding the response.","exclusiveMinimum":0,"maximum":50,"type":"integer"},"outputFormat":{"description":"Response format. Omitted or `json` (default, preserves v1.8 behavior) returns JSON.stringify of the result. `markdown` renders a human-readable view of the same data. `both` returns both content items in one response, so a client can display markdown to the user and parse JSON for the agent loop without a second call. `verify-fix-table` (v1.10, applies to `analyzeAbandonedMemory` and `diffMemgraphs`) emits a focused 4-column markdown comparison table (Class | Before | After | Delta) of the actionable rows; other tools fall back to `markdown` for this value.","enum":["markdown","json","both","verify-fix-table"],"type":"string"},"path":{"description":"Absolute path to a `.memgraph` file (export from Xcode Memory Graph Debugger).","minLength":1,"type":"string"},"referenceTreeTopN":{"default":20,"description":"When `leakCount` is 0 (the typical abandoned-memory case), also run `leaks --referenceTree --groupByType --noContent` and surface the top N classes by live instance count in `abandonedMemoryTop[]`. Set to 0 to skip the second leaks invocation. Default 20.","maximum":200,"minimum":0,"type":"integer"},"verbosity":{"default":"compact","description":"Class-name verbosity. `compact` (default) drops module prefixes, collapses nested SwiftUI ModifiedContent into `+N modifiers`, and truncates deep generics with a hash placeholder. `normal` keeps more detail. `full` returns Swift demangled names verbatim.","enum":["compact","normal","full"],"type":"string"}},"required":["path"],"type":"object"},"name":"analyzeMemgraph","title":"Analyze a .memgraph file"},{"description":"[mg.memory] Extract just the ROOT CYCLE blocks from a `.memgraph` as flattened chains (depth + edge + retainKind + className + address). Optionally filter to cycles touching a specific class name (substring match). Use this when you want to inspect chains without the noise of standalone leaks.","execution":{"taskSupport":"forbidden"},"inputSchema":{"$schema":"http://json-schema.org/draft-07/schema#","additionalProperties":false,"properties":{"className":{"description":"Optional substring filter — only return cycles where this class name appears in the chain (e.g. \"DetailViewModel\").","type":"string"},"maxDepth":{"default":10,"description":"Truncate chains beyond this depth (default 10).","exclusiveMinimum":0,"type":"integer"},"path":{"description":"Absolute path to a `.memgraph` file.","minLength":1,"type":"string"},"verbosity":{"default":"compact","description":"Class-name verbosity. `compact` shortens SwiftUI generic names aggressively; `full` returns demangled names verbatim.","enum":["compact","normal","full"],"type":"string"}},"required":["path"],"type":"object"},"name":"findCycles","title":"Find ROOT CYCLE blocks in a .memgraph"},{"description":"[mg.memory] Walk the cycle forest from a `.memgraph` and return every retain chain that ends in a node whose className contains the given substring. Useful for answering \"who is keeping <class> alive?\". Returns paths from a top-level node down to the matching node.","execution":{"taskSupport":"forbidden"},"inputSchema":{"$schema":"http://json-schema.org/draft-07/schema#","additionalProperties":false,"properties":{"className":{"description":"Class name (or substring) to find retainers for, e.g. \"DetailViewModel\".","minLength":1,"type":"string"},"includeReferenceTree":{"default":false,"description":"v1.12+. When true, also run `leaks --debug=stacks --debug='<className>$'` to surface per-instance allocation stacks aggregated by call-stack fingerprint. Required on memgraphs where `leakCount: 0` and the class is reachable from KVO/NotificationCenter/caches (abandoned-memory shape). Each chain returns the allocation call stack + the unique retainer classes + a representative instance address. **Note:** `leaks --debug=stacks` only emits blocks for instances whose allocation stack was recorded, which requires the target was launched with `MallocStackLogging=1`. Xcode's Memory Graph Debugger export does NOT enable MSL by default, so memgraphs captured that way may surface fewer chains than the total instance count from `analyzeMemgraph.abandonedMemorySuspects[]`. Default false preserves v1.11 behavior.","type":"boolean"},"maxResults":{"default":10,"description":"Cap on how many retain chains to return (default 10).","exclusiveMinimum":0,"type":"integer"},"path":{"description":"Absolute path to a `.memgraph` file.","minLength":1,"type":"string"}},"required":["path","className"],"type":"object"},"name":"findRetainers","title":"Find what retains a class"},{"description":"[mg.memory] Count how many times each class appears in a `.memgraph`'s leaked nodes. Provide `className` (substring) for a single number, or omit it to get the top N most-leaked classes. Use this to confirm whether a fix actually reduced instance counts.","execution":{"taskSupport":"forbidden"},"inputSchema":{"$schema":"http://json-schema.org/draft-07/schema#","additionalProperties":false,"properties":{"additionalNoisePatterns":{"description":"v1.17 B-10. Extra regex patterns (one per string) added to the noise filter. Useful when your app's noise classes are not in the curated list (e.g. third-party SDK collection storage that scales with app activity). Patterns are matched case-sensitively against the class name.","items":{"minLength":1,"type":"string"},"type":"array"},"className":{"description":"Optional class name (substring). When provided, only that class's count is returned. When omitted, all class counts are returned.","type":"string"},"excludeFrameworkNoise":{"default":true,"description":"v1.17 B-10. When `includeReferenceTree: true`, populates `actionableCounts[]` with the framework-noise classes filtered out (NSMutableDictionary, CFString, __DATA __bss, dispatch_queue_t, etc.). Set false to disable the filter and surface the raw counts only via `counts[]`. The curated noise list is calibrated for abandoned-memory investigations; combine with `additionalNoisePatterns` / `unsuppressClassPatterns` to tune.","type":"boolean"},"includeReferenceTree":{"default":false,"description":"v1.12+. When true, also parse `leaks --referenceTree --groupByType --noContent` output and surface heap-wide instance counts alongside the cycle-side counts. Required to find classes on memgraphs where `leakCount: 0` and the abandoned-memory shape is what's interesting (e.g. orphaned KVO observers reachable from the global registry). Adds a second `leaks` invocation, run in parallel. Default false preserves v1.11 behavior.","type":"boolean"},"noiseAuditMode":{"default":false,"description":"v1.17 B-10. When true, returns an extra `noiseAudit[]` field listing each class that was filtered out, with the matching reason ('default-list', 'additional-pattern', or 'kept-by-unsuppress'). Lets the caller verify the filter is calibrated for their app before trusting `actionableCounts[]`.","type":"boolean"},"path":{"description":"Absolute path to a `.memgraph` file.","minLength":1,"type":"string"},"sortBy":{"default":"count","description":"v1.14+. Ranks the topN by either instance count (default, preserves v1.13 behavior) or total bytes (FLEX's 'Size' sort). totalBytes is `count * instanceSizeBytes` and is the right rank for 'where is my memory going?' investigations vs 'how many instances are alive?'. Per-class instanceSizeBytes + totalBytes are returned regardless of sort key.","enum":["count","totalBytes"],"type":"string"},"topN":{"default":20,"description":"When `className` is omitted, return the top N most-leaked classes (default 20).","exclusiveMinimum":0,"type":"integer"},"unsuppressClassPatterns":{"description":"v1.17 B-10. Regex patterns that override the noise filter. Use when the default filter false-positives an actionable class (e.g. your app's `NSMutableDictionary` subclass is the actual leak site, or you want CFString back on the actionable list for a string-budget investigation).","items":{"minLength":1,"type":"string"},"type":"array"}},"required":["path"],"type":"object"},"name":"countAlive","title":"Count instances by class"},{"description":"[mg.memory] Compare a baseline `.memgraph` (`before`) against a comparison `.memgraph` (`after`). Returns total leak/byte deltas, classes whose counts increased or decreased, and ROOT CYCLE signatures bucketed into newInAfter / goneFromBefore / persisted. The killer feature for verifying that a fix actually worked.","execution":{"taskSupport":"forbidden"},"inputSchema":{"$schema":"http://json-schema.org/draft-07/schema#","additionalProperties":false,"properties":{"after":{"description":"Absolute path to the comparison `.memgraph` file.","minLength":1,"type":"string"},"before":{"description":"Absolute path to the baseline `.memgraph` file.","minLength":1,"type":"string"},"outputFormat":{"description":"Response format. Omitted or `json` (default, preserves v1.8 behavior) returns JSON.stringify of the result. `markdown` renders a human-readable view of the same data. `both` returns both content items in one response, so a client can display markdown to the user and parse JSON for the agent loop without a second call. `verify-fix-table` (v1.10, applies to `analyzeAbandonedMemory` and `diffMemgraphs`) emits a focused 4-column markdown comparison table (Class | Before | After | Delta) of the actionable rows; other tools fall back to `markdown` for this value.","enum":["markdown","json","both","verify-fix-table"],"type":"string"}},"required":["before","after"],"type":"object"},"name":"diffMemgraphs","title":"Diff two memgraph snapshots"},{"description":"[mg.memory] Compare two `.memgraph` snapshots on heap reference-tree class counts (NOT cycle list) and classify each class's growth shape. Surfaces the family of bugs the cycle-only `diffMemgraphs` misses: orphaned KVO observers, never-removed NotificationCenter handlers, caches that never evict, singleton-retained payloads, and the long tail of `unknown-growth` worth manual inspection.\n\nPair with the verify-fix loop: `captureScenarioState({label:'before'})` -> ship fix -> `captureScenarioState({label:'after'})` -> `analyzeAbandonedMemory(beforePath, afterPath)`. Validated end-to-end on the notelet investigation where AVPlayerItem went 342 to 0 across a fix that was invisible in standard `leaks` output (leakCount: 0 both sides).\n\nReturns `growthByClass[]` ranked by absolute delta, each entry tagged with `classification` (kvo-observer-orphaned, notificationcenter-observer-leaked, cache-too-aggressive, singleton-retains-payload, unknown-growth) + `confidence` tier + `hint`. The classifier escalates large co-occurrence growth: if NSKeyValueObservance grew, other large-delta classes are assumed to be the observed types being retained, classified as `kvo-observer-orphaned` with confidence scaling by delta size.","execution":{"taskSupport":"forbidden"},"inputSchema":{"$schema":"http://json-schema.org/draft-07/schema#","additionalProperties":false,"properties":{"afterPath":{"description":"Absolute path to the post-fix `.memgraph` (the AFTER snapshot). Same workflow as `beforePath`, after applying the candidate fix.","minLength":1,"type":"string"},"beforePath":{"description":"Absolute path to the baseline `.memgraph` (the BEFORE snapshot). Use `captureScenarioState({ label: 'before' })` to produce one in the standard verify-fix flow.","minLength":1,"type":"string"},"classFilter":{"description":"Optional substring filter. When set, only classes whose name contains this substring are included in the response. Useful for verifying a specific class went to baseline without seeing the surrounding noise.","type":"string"},"outputFormat":{"description":"Response format. Omitted or `json` (default, preserves v1.8 behavior) returns JSON.stringify of the result. `markdown` renders a human-readable view of the same data. `both` returns both content items in one response, so a client can display markdown to the user and parse JSON for the agent loop without a second call. `verify-fix-table` (v1.10, applies to `analyzeAbandonedMemory` and `diffMemgraphs`) emits a focused 4-column markdown comparison table (Class | Before | After | Delta) of the actionable rows; other tools fall back to `markdown` for this value.","enum":["markdown","json","both","verify-fix-table"],"type":"string"},"topN":{"default":25,"description":"Cap on `growthByClass[]` length. Default 25, max 200. Classes are ranked by absolute instance-count delta descending.","exclusiveMinimum":0,"maximum":200,"type":"integer"}},"required":["beforePath","afterPath"],"type":"object"},"name":"analyzeAbandonedMemory","title":"Diff reference-tree class counts and classify abandoned-memory shape"},{"description":"[ops] Triage and clean up `.trace` bundles produced by `recordTimeProfile`. Each bundle is typically tens to hundreds of MB; after a few sessions the trace root fills up fast and v1.8 had no built-in cleanup.\n\n**Default-safe:** `dryRun: true` by default. The tool returns the list of candidates with `path`, `sizeMB`, and `ageDays` (sorted oldest-first) but deletes nothing. Pass `dryRun: false` only when the user has reviewed the candidates and authorized deletion.\n\n**Scope:** restricted to `MEMORYDETECTIVE_TRACE_ROOT` by default. To clean up an arbitrary directory, pass `root: <path>` AND set `MEMORYDETECTIVE_ALLOW_EXTERNAL_CLEANUP=1` in the env. Without the env var the tool returns `ok: false` with the failure reason and deletes nothing; destructive disk operations outside the configured boundary are default-deny.\n\n**Recursion boundary:** the tool walks subdirectories looking for `*.trace` directories, but stops at the `.trace` boundary (does NOT descend INTO bundles). xctrace writes structured content inside (Run1, Form1.template, etc.) that must not be treated as nested bundles.\n\nUse `olderThanDays: N` to keep recent traces and only target stale ones (e.g. older than 7 days). Omit to consider all bundles regardless of age.","execution":{"taskSupport":"forbidden"},"inputSchema":{"$schema":"http://json-schema.org/draft-07/schema#","additionalProperties":false,"properties":{"dryRun":{"default":true,"description":"When `true` (default), the tool returns the list of candidates without deleting. Pass `false` to actually delete. The default-to-true means an accidental call previews instead of destroying.","type":"boolean"},"olderThanDays":{"description":"Only consider `.trace` bundles whose modification time is older than this many days. Omit to consider all traces under the root regardless of age.","minimum":0,"type":"number"},"outputFormat":{"description":"Response format. Omitted or `json` (default, preserves v1.8 behavior) returns JSON.stringify of the result. `markdown` renders a human-readable view of the same data. `both` returns both content items in one response, so a client can display markdown to the user and parse JSON for the agent loop without a second call. `verify-fix-table` (v1.10, applies to `analyzeAbandonedMemory` and `diffMemgraphs`) emits a focused 4-column markdown comparison table (Class | Before | After | Delta) of the actionable rows; other tools fall back to `markdown` for this value.","enum":["markdown","json","both","verify-fix-table"],"type":"string"},"root":{"description":"Directory to scan. Defaults to `MEMORYDETECTIVE_TRACE_ROOT`. If the resolved path is outside the configured trace root, the tool requires `MEMORYDETECTIVE_ALLOW_EXTERNAL_CLEANUP=1` in the environment to proceed.","type":"string"}},"type":"object"},"name":"cleanupTraces","title":"Preview and delete `.trace` bundles under TRACE_ROOT"},{"description":"[mg.memory] Match each ROOT CYCLE against a built-in catalog of 8 known antipatterns (TagIndexProjection cycle, ForEachState retention, Combine sink-store-self, Task-without-weak-self, NotificationCenter observer, viewmodel-wrapped-strong closure, UINavigationController host, _DictionaryStorage internal). Returns `patternId`, `confidence`, and a `fixHint` per cycle.\n\nPipeline: this is the killer tool — after the result, **follow `suggestedNextCalls`** which pre-translates each match to a Swift regex (`swiftSearchPattern`) + the captured class name (`swiftGetSymbolDefinition`). Discovery is data, not inference.","execution":{"taskSupport":"forbidden"},"inputSchema":{"$schema":"http://json-schema.org/draft-07/schema#","additionalProperties":false,"properties":{"maxResults":{"default":20,"description":"Cap on classifications returned (default 20).","exclusiveMinimum":0,"type":"integer"},"path":{"description":"Absolute path to a `.memgraph` file.","minLength":1,"type":"string"}},"required":["path"],"type":"object"},"name":"classifyCycle","title":"Classify ROOT CYCLEs against known patterns"},{"description":"[mg.trace] Run `xcrun xctrace export` against a `.trace` bundle for the `potential-hangs` schema and return aggregated stats (Hang vs Microhang counts, longest, average, total duration) plus the top N longest hangs sorted by duration. Use `minDurationMs: 250` to filter to user-visible hangs only. Pass `topFramesByHangStartNs: { '<startNs>': '<topFrame>' }` to enrich each top hang with a `mainThreadViolations[]` field that classifies the kind of work blocking the main thread (sync-io, db-lock, network, lock-contention). The map keys are stringified `startNs` values; the typical pipeline is to call `analyzeTimeProfile` separately on the same trace, correlate samples to the hang windows by timestamp, then re-call `analyzeHangs` with the resulting map.","execution":{"taskSupport":"forbidden"},"inputSchema":{"$schema":"http://json-schema.org/draft-07/schema#","additionalProperties":false,"properties":{"includeStackClassification":{"default":false,"description":"v1.12+. When true, analyzeHangs internally exports the `time-profile` schema in parallel with `potential-hangs`, correlates samples to hang windows by timestamp, picks the dominant top frame per hang, and runs `classifyHangFrame` on it. The `mainThreadViolations[]` field on each top hang is populated automatically. Replaces the v1.9 caller-built `topFramesByHangStartNs` map: most callers should set this flag instead of building the map manually. Adds a second xctrace export call, run in parallel with the hangs export so wall-clock is unchanged when the trace export succeeds. Falls back gracefully (empty violations, no error) when the time-profile schema is absent or xctrace SIGSEGVs on it.","type":"boolean"},"minDurationMs":{"default":0,"description":"Filter out hangs shorter than this duration in milliseconds (default 0, include all). Use 250 to focus on 'real' hangs only.","minimum":0,"type":"number"},"outputFormat":{"description":"Response format. Omitted or `json` (default, preserves v1.8 behavior) returns JSON.stringify of the result. `markdown` renders a human-readable view of the same data. `both` returns both content items in one response, so a client can display markdown to the user and parse JSON for the agent loop without a second call. `verify-fix-table` (v1.10, applies to `analyzeAbandonedMemory` and `diffMemgraphs`) emits a focused 4-column markdown comparison table (Class | Before | After | Delta) of the actionable rows; other tools fall back to `markdown` for this value.","enum":["markdown","json","both","verify-fix-table"],"type":"string"},"timeRangeMs":{"additionalProperties":false,"description":"Optional time-window filter. Only hangs whose `startNs` falls within `[startMs, endMs]` (milliseconds since recording start) are included. Use this to answer 'what hangs happened between t=2s and t=7s?' without re-recording.","properties":{"endMs":{"minimum":0,"type":"number"},"startMs":{"minimum":0,"type":"number"}},"required":["startMs","endMs"],"type":"object"},"topFramesByHangStartNs":{"additionalProperties":{"type":"string"},"description":"Optional supplemental map from a hang's `startNs` (as a string) to the top frame seen during that hang. When provided, each matching hang in `top[]` is enriched with `mainThreadViolations[]` that catalog the kind of work happening on the main thread (sync-io, db-lock, network, lock-contention). Typical pipeline: call `analyzeTimeProfile` separately on the same `.trace`, correlate samples to hang windows by timestamp, then re-call `analyzeHangs` with the resulting map. Omit to skip the enrichment. SUPERSEDED in v1.12 by `includeStackClassification: true`, which builds this map internally.","type":"object"},"topN":{"default":10,"description":"Return the top N longest hangs in the response (default 10).","exclusiveMinimum":0,"type":"integer"},"tracePath":{"description":"Absolute path to a `.trace` bundle (output of `xctrace record` with the Time Profiler or Hangs template).","minLength":1,"type":"string"}},"required":["tracePath"],"type":"object"},"name":"analyzeHangs","title":"Analyze potential hangs from a .trace bundle"},{"description":"[mg.trace] Export the `time-profile` schema from a `.trace` bundle and return top symbols by sample count. Note: heavy/unsymbolicated traces may crash xctrace export — when that happens, the tool returns a `notice` field with workarounds (open in Instruments first to symbolicate, or re-record shorter).","execution":{"taskSupport":"forbidden"},"inputSchema":{"$schema":"http://json-schema.org/draft-07/schema#","additionalProperties":false,"properties":{"outputFormat":{"description":"Response format. Omitted or `json` (default, preserves v1.8 behavior) returns JSON.stringify of the result. `markdown` renders a human-readable view of the same data. `both` returns both content items in one response, so a client can display markdown to the user and parse JSON for the agent loop without a second call. `verify-fix-table` (v1.10, applies to `analyzeAbandonedMemory` and `diffMemgraphs`) emits a focused 4-column markdown comparison table (Class | Before | After | Delta) of the actionable rows; other tools fall back to `markdown` for this value.","enum":["markdown","json","both","verify-fix-table"],"type":"string"},"topN":{"default":20,"description":"Return the top N hottest stacks by sample count (default 20).","exclusiveMinimum":0,"type":"integer"},"tracePath":{"description":"Absolute path to a `.trace` bundle.","minLength":1,"type":"string"}},"required":["tracePath"],"type":"object"},"name":"analyzeTimeProfile","title":"Analyze a Time Profiler trace"},{"description":"[mg.discover] Run `xcrun xctrace list devices` and return parsed devices/simulators with their UDIDs. The LLM should call this before `recordTimeProfile` to discover the right UDID without asking the user. Set `includeOffline: true` to include disconnected devices.","execution":{"taskSupport":"forbidden"},"inputSchema":{"$schema":"http://json-schema.org/draft-07/schema#","additionalProperties":false,"properties":{"includeOffline":{"default":false,"description":"Include devices listed under \"Devices Offline\" (default false).","type":"boolean"}},"type":"object"},"name":"listTraceDevices","title":"List physical devices and simulators"},{"description":"[mg.discover] Run `xcrun xctrace list templates` and return parsed standard + custom templates. Useful when picking a template name for `recordTimeProfile` (e.g. \"Time Profiler\", \"Animation Hitches\", \"Allocations\").","execution":{"taskSupport":"forbidden"},"inputSchema":{"$schema":"http://json-schema.org/draft-07/schema#","properties":{},"type":"object"},"name":"listTraceTemplates","title":"List xctrace recording templates"},{"description":"[mg.discover] Single-call orientation tool for `.trace` bundles. Runs `xcrun xctrace export --xpath '/trace-toc/run'` and returns the schemas present (potential-hangs, animation-hitches, time-profile, allocations, app-launch, ...), their row counts, the device model, the OS version, the template name, the recording timestamp, and a `suggestedNextCalls[]` array mapping each populated schema to its matching `analyze*` tool with pre-populated args. Use this as the FIRST call when handed a `.trace` so you do not have to chain 5 analyzers blindly. Empty traces return `schemas: []` with a diagnosis pointing at Instruments.app for manual triage. Fallback path: when `/trace-toc/run` returns non-zero, retries with `/trace-toc` (older xctrace versions).","execution":{"taskSupport":"forbidden"},"inputSchema":{"$schema":"http://json-schema.org/draft-07/schema#","additionalProperties":false,"properties":{"tracePath":{"description":"Absolute path to a `.trace` bundle (output of `xcrun xctrace record` or Instruments).","minLength":1,"type":"string"}},"required":["tracePath"],"type":"object"},"name":"inspectTrace","title":"Inspect a .trace bundle's TOC + suggest analyzers"},{"description":"[mg.synthesize] The trace-to-summary-card-in-one-call play. Chains `inspectTrace` + the matching `analyze*` tools (potential-hangs, animation-hitches, time-profile, allocations, app-launch) and returns BOTH a structured per-area result AND a pre-rendered compact markdown card (< 10 KB at default settings). Use this as the FIRST call when handed a `.trace` if you want one synthesis pass instead of chaining 5-6 analyzers manually. The markdown card carries a 1-sentence headline naming the biggest user-impact finding, then per-area sub-sections, then `suggestedNextCalls[]` for drilling in. Empty schemas are suppressed from the card to reduce noise. Failed analyzers (e.g. xctrace SIGSEGV on time-profile) surface inline with their workaround notice. Pass `verbose: true` to expand each section's top-N from 5 to 15+. Pass `focus: \"hangs\" | \"hitches\" | \"allocations\" | \"launch\"` to bias the summary toward a specific area.","execution":{"taskSupport":"forbidden"},"inputSchema":{"$schema":"http://json-schema.org/draft-07/schema#","additionalProperties":false,"properties":{"focus":{"default":"all","description":"When set to a specific area, the summary card emphasizes that area and downplays others. Useful for piping into more focused agent loops. Default `all`.","enum":["hangs","hitches","allocations","launch","network","all"],"type":"string"},"tracePath":{"description":"Absolute path to a `.trace` bundle (output of `xcrun xctrace record` or Instruments).","minLength":1,"type":"string"},"verbose":{"default":false,"description":"When true, the markdown card includes the full top-N per area (15+ rows per section) instead of the default 5. Trade-off: card grows from <10 KB to potentially 30+ KB.","type":"boolean"}},"required":["tracePath"],"type":"object"},"name":"summarizeTrace","title":"Single-call cross-schema summary card for a .trace bundle"},{"description":"[mg.trace] Wrapper around `xcrun xctrace record`. Capture a `.trace` bundle from a running app on a device or simulator. Required: exactly 1 of `deviceId`/`simulatorId`, exactly 1 of `attachAppName`/`attachPid`/`launchBundleId`, an `output` path ending in `.trace`. Defaults: template = \"Time Profiler\", durationSec = 90.","execution":{"taskSupport":"forbidden"},"inputSchema":{"$schema":"http://json-schema.org/draft-07/schema#","additionalProperties":false,"properties":{"attachAppName":{"description":"Attach to a running app by name (e.g. \"DemoApp\"). Mutually exclusive with `attachPid` and `launchBundleId`.","type":"string"},"attachPid":{"description":"Attach by PID. Mutually exclusive with `attachAppName` and `launchBundleId`.","exclusiveMinimum":0,"type":"integer"},"deviceId":{"description":"UDID of a physical device. Mutually exclusive with `simulatorId`.","type":"string"},"durationSec":{"default":90,"description":"Recording duration in seconds (default 90, max 600).","exclusiveMinimum":0,"maximum":600,"type":"integer"},"launchBundleId":{"description":"Launch app by bundle id and start recording at launch. Mutually exclusive with `attachAppName` and `attachPid`.","type":"string"},"output":{"description":"Absolute path where the resulting `.trace` bundle should be written. Must end in `.trace`.","minLength":1,"type":"string"},"simulatorId":{"description":"UDID of a simulator. Mutually exclusive with `deviceId`. Use `listTraceDevices` to find UDIDs.","type":"string"},"template":{"default":"Time Profiler","description":"xctrace template name (e.g. \"Time Profiler\", \"Animation Hitches\", \"Allocations\"). Default \"Time Profiler\".","type":"string"}},"required":["output"],"type":"object"},"name":"recordTimeProfile","title":"Record a Time Profiler trace"},{"description":"[mg.memory] Wrapper around `leaks --outputGraph`. Resolves `appName` to a PID via `pgrep -x` (or accepts `pid` directly), then writes a `.memgraph` snapshot. **Limitation**: only works for processes running on the local Mac (Mac apps + iOS simulator). Does NOT work for physical iOS devices, use Xcode's Memory Graph button there.","execution":{"taskSupport":"forbidden"},"inputSchema":{"$schema":"http://json-schema.org/draft-07/schema#","additionalProperties":false,"properties":{"appName":{"description":"App name (resolves to PID via `pgrep -x`). Mutually exclusive with `pid`.","type":"string"},"output":{"description":"Absolute path where the `.memgraph` should be written. Must end in `.memgraph`.","minLength":1,"type":"string"},"pid":{"description":"PID of the running process. Mutually exclusive with `appName`.","exclusiveMinimum":0,"type":"integer"}},"required":["output"],"type":"object"},"name":"captureMemgraph","title":"Capture a .memgraph from a running process"},{"description":"[mg.build] Single-call orchestration that runs `xcodebuild build` (optional), boots the iOS Simulator, installs the .app, and launches it with `MallocStackLogging=1` propagated via `SIMCTL_CHILD_*`. Required because `leaks --outputGraph` regressed on macOS 26.x and only works when the target was launched with malloc-stack-logging in its environment. Returns the host PID + simulator UDID + bundle id ready to chain into `captureMemgraph`. Auto-discovers BUILT_PRODUCTS_DIR, WRAPPER_NAME, EXECUTABLE_NAME, and PRODUCT_BUNDLE_IDENTIFIER from `xcodebuild -showBuildSettings -json`. Required: `scheme` and exactly one of `workspace` or `project`.","execution":{"taskSupport":"forbidden"},"inputSchema":{"$schema":"http://json-schema.org/draft-07/schema#","additionalProperties":false,"properties":{"buildBeforeLaunch":{"default":true,"description":"Run `xcodebuild build` before installing. Set false when you've already built and want to skip straight to install/launch.","type":"boolean"},"bundleId":{"description":"Override the bundle identifier. By default it is discovered from `xcodebuild -showBuildSettings`.","type":"string"},"configuration":{"default":"Debug","description":"xcodebuild configuration. Default \"Debug\".","type":"string"},"derivedDataPath":{"description":"Custom -derivedDataPath. Useful to avoid collisions when multiple investigations run in parallel.","type":"string"},"envVars":{"additionalProperties":{"type":"string"},"description":"Extra env vars to apply to the launched app (propagated via SIMCTL_CHILD_*). Default already includes MallocStackLogging=1.","type":"object"},"launchArgs":{"default":[],"description":"Extra arguments passed to the app on launch.","items":{"type":"string"},"type":"array"},"project":{"description":"Absolute path to a .xcodeproj. Mutually exclusive with `workspace`.","type":"string"},"scheme":{"description":"Xcode scheme that builds the iOS application bundle.","minLength":1,"type":"string"},"simulator":{"additionalProperties":false,"description":"Pick a simulator by `udid`, by `name` (with optional `os`), or omit to use whichever simulator is currently booted.","properties":{"name":{"type":"string"},"os":{"type":"string"},"udid":{"type":"string"}},"type":"object"},"warmupSeconds":{"default":3,"description":"How long to wait after launch before resolving the host PID. Default 3 seconds.","maximum":60,"minimum":0,"type":"number"},"workspace":{"description":"Absolute path to a .xcworkspace. Mutually exclusive with `project`.","type":"string"}},"required":["scheme"],"type":"object"},"name":"bootAndLaunchForLeakInvestigation","title":"Build, boot, install, and launch an iOS app for leak investigation"},{"description":"[mg.scenario] Drive the iOS Simulator through a sequence of UI actions (tap, swipe, wait, type) and optionally repeat the sequence N times to amplify a leak that only manifests after iteration. Tied to verify-fix: pair with captureScenarioState before/after to make leak reproductions deterministic. Soft dependency on `axe` (https://github.com/cameroncooke/AXe) — when missing, returns a structured workaroundNotice with install instructions. Tap targets accept `label`, `elementId`, or explicit `coords`.","execution":{"taskSupport":"forbidden"},"inputSchema":{"$schema":"http://json-schema.org/draft-07/schema#","additionalProperties":false,"properties":{"actions":{"description":"Ordered list of UI actions: { type: 'tap', label|elementId|coords }, { type: 'swipe', from, to }, { type: 'wait', seconds }, or { type: 'type', text }.","items":{"anyOf":[{"additionalProperties":false,"properties":{"coords":{"description":"Tap at explicit [x, y] coordinates. Mutually exclusive with `label` and `elementId`.","items":[{"type":"number"},{"type":"number"}],"maxItems":2,"minItems":2,"type":"array"},"elementId":{"description":"Match an element by its accessibility identifier. Mutually exclusive with `label` and `coords`.","type":"string"},"label":{"description":"Match an element by its accessibility label or identifier. Mutually exclusive with `coords` and `elementId`.","type":"string"},"type":{"const":"tap","type":"string"}},"required":["type"],"type":"object"},{"additionalProperties":false,"properties":{"durationMs":{"default":250,"exclusiveMinimum":0,"maximum":5000,"type":"integer"},"from":{"items":[{"type":"number"},{"type":"number"}],"maxItems":2,"minItems":2,"type":"array"},"to":{"items":[{"type":"number"},{"type":"number"}],"maxItems":2,"minItems":2,"type":"array"},"type":{"const":"swipe","type":"string"}},"required":["type","from","to"],"type":"object"},{"additionalProperties":false,"properties":{"seconds":{"maximum":60,"minimum":0,"type":"number"},"type":{"const":"wait","type":"string"}},"required":["type","seconds"],"type":"object"},{"additionalProperties":false,"properties":{"text":{"type":"string"},"type":{"const":"type","type":"string"}},"required":["type","text"],"type":"object"}]},"minItems":1,"type":"array"},"finalUITreePath":{"description":"When provided, after the scenario completes the final UI tree is written here as JSON for the caller to verify the app ended in the expected state.","type":"string"},"repeat":{"default":1,"description":"Run the entire actions sequence this many times. Default 1. Use 5-10 to amplify subtle leaks that accumulate per repetition.","exclusiveMinimum":0,"maximum":100,"type":"integer"},"screenshotDir":{"description":"v1.15+. DebugSwift-inspired. When provided, captures a simulator screenshot after each action into `<screenshotDir>/iteration-{N}_step-{M}.png`. Useful for 'what was on screen when the leak fired?' context in verify-fix loops. Uses `xcrun simctl io ... screenshot` directly (no axe dependency). Screenshot capture failures are non-fatal: surfaced in `failures[]` but do not halt the scenario.","type":"string"},"settleBetweenActionsMs":{"default":500,"description":"Pause between consecutive actions in milliseconds. Default 500. Increase for animation-heavy flows.","maximum":10000,"minimum":0,"type":"integer"},"simulatorUDID":{"description":"UDID of the booted simulator. Use listTraceDevices to find one.","minLength":1,"type":"string"}},"required":["simulatorUDID","actions"],"type":"object"},"name":"replayScenario","title":"Replay a UI scenario to amplify a suspected leak"},{"description":"[mg.scenario] Composite snapshot: writes a `.memgraph`, a `.png` screenshot, and a `.ui.json` accessibility tree into `outputDir`, all prefixed by `label` (e.g. `before` / `after`). Designed to bracket a fix or a replayScenario call so you can chain into diffMemgraphs and validate that a cycle actually closed. Sub-captures are best-effort: if leaks fails (macOS 26.x minimal-corpse), the screenshot + UI tree still complete and the captureMemgraph workaroundNotice is surfaced for follow-up. Required: `simulatorUDID`, `outputDir`, and exactly one of `pid` / `appName`.","execution":{"taskSupport":"forbidden"},"inputSchema":{"$schema":"http://json-schema.org/draft-07/schema#","additionalProperties":false,"properties":{"appName":{"description":"App executable name as visible in pgrep. Mutually exclusive with `pid`.","type":"string"},"include":{"default":["memgraph","screenshot","uiTree"],"description":"Which artifacts to capture. Default captures all three.","items":{"enum":["memgraph","screenshot","uiTree"],"type":"string"},"type":"array"},"label":{"default":"snapshot","description":"Filename prefix for the captured artifacts. Use \"before\" / \"after\" for verify-fix flows.","minLength":1,"type":"string"},"outputDir":{"description":"Absolute directory where the snapshot files are written. Created if it does not exist.","minLength":1,"type":"string"},"pid":{"description":"PID of the host-side app process. Mutually exclusive with `appName`. Pass the value returned by bootAndLaunchForLeakInvestigation.","exclusiveMinimum":0,"type":"integer"},"simulatorUDID":{"description":"UDID of the booted simulator hosting the target app. Used for screenshot + UI tree captures.","minLength":1,"type":"string"}},"required":["simulatorUDID","outputDir"],"type":"object"},"name":"captureScenarioState","title":"Capture a labeled before/after snapshot for verify-fix"},{"description":"[mg.trace] Parse the `animation-hitches` schema from a `.trace` recorded with the Animation Hitches Instruments template. Returns hitch totals, by-type counts, longest hitches, and how many crossed the user-perceptible 100ms threshold.","execution":{"taskSupport":"forbidden"},"inputSchema":{"$schema":"http://json-schema.org/draft-07/schema#","additionalProperties":false,"properties":{"minDurationMs":{"default":0,"description":"Filter out hitches shorter than this duration in milliseconds. Apple categorizes hitches >100ms as user-perceptible, pass 100 to focus on those.","minimum":0,"type":"number"},"outputFormat":{"description":"Response format. Omitted or `json` (default, preserves v1.8 behavior) returns JSON.stringify of the result. `markdown` renders a human-readable view of the same data. `both` returns both content items in one response, so a client can display markdown to the user and parse JSON for the agent loop without a second call. `verify-fix-table` (v1.10, applies to `analyzeAbandonedMemory` and `diffMemgraphs`) emits a focused 4-column markdown comparison table (Class | Before | After | Delta) of the actionable rows; other tools fall back to `markdown` for this value.","enum":["markdown","json","both","verify-fix-table"],"type":"string"},"timeRangeMs":{"additionalProperties":false,"description":"Optional time-window filter. Only hitches whose `startNs` falls within `[startMs, endMs]` (milliseconds since recording start) are included. Use this to answer 'what hitches happened during this 5-second user-visible jank window?' without re-recording.","properties":{"endMs":{"minimum":0,"type":"number"},"startMs":{"minimum":0,"type":"number"}},"required":["startMs","endMs"],"type":"object"},"topN":{"default":10,"description":"Return the top N longest hitches in the response (default 10).","exclusiveMinimum":0,"type":"integer"},"tracePath":{"description":"Absolute path to a `.trace` bundle recorded with the Animation Hitches template (`xcrun xctrace record --template 'Animation Hitches' --attach <app|pid>`).","minLength":1,"type":"string"}},"required":["tracePath"],"type":"object"},"name":"analyzeAnimationHitches","title":"Analyze animation hitches from a .trace bundle"},{"description":"[mg.trace] Parse the `allocations` schema from a `.trace` recorded with the Allocations Instruments template. Returns per-category aggregates (cumulative bytes, allocation count, lifecycle = transient/persistent/mixed), top allocators by size and by count, and a one-liner diagnosis identifying the dominant allocator.","execution":{"taskSupport":"forbidden"},"inputSchema":{"$schema":"http://json-schema.org/draft-07/schema#","additionalProperties":false,"properties":{"minBytes":{"default":0,"description":"Filter out individual allocations smaller than this size in bytes (default 0). Use 1024 to focus on >1KB allocations.","minimum":0,"type":"number"},"outputFormat":{"description":"Response format. Omitted or `json` (default, preserves v1.8 behavior) returns JSON.stringify of the result. `markdown` renders a human-readable view of the same data. `both` returns both content items in one response, so a client can display markdown to the user and parse JSON for the agent loop without a second call. `verify-fix-table` (v1.10, applies to `analyzeAbandonedMemory` and `diffMemgraphs`) emits a focused 4-column markdown comparison table (Class | Before | After | Delta) of the actionable rows; other tools fall back to `markdown` for this value.","enum":["markdown","json","both","verify-fix-table"],"type":"string"},"topN":{"default":15,"description":"Return the top N allocators by aggregated size (default 15).","exclusiveMinimum":0,"type":"integer"},"tracePath":{"description":"Absolute path to a `.trace` bundle recorded with the Allocations template (`xcrun xctrace record --template Allocations --attach <app|pid>`).","minLength":1,"type":"string"}},"required":["tracePath"],"type":"object"},"name":"analyzeAllocations","title":"Analyze allocations from a .trace bundle"},{"description":"[mg.trace] Parse the `app-launch` schema from a `.trace` recorded with the App Launch Instruments template. Returns total launch time, launch type (cold/warm), per-phase breakdown (process-creation, dyld-init, ObjC-init, AppDelegate, first-frame), and the slowest phase.","execution":{"taskSupport":"forbidden"},"inputSchema":{"$schema":"http://json-schema.org/draft-07/schema#","additionalProperties":false,"properties":{"outputFormat":{"description":"Response format. Omitted or `json` (default, preserves v1.8 behavior) returns JSON.stringify of the result. `markdown` renders a human-readable view of the same data. `both` returns both content items in one response, so a client can display markdown to the user and parse JSON for the agent loop without a second call. `verify-fix-table` (v1.10, applies to `analyzeAbandonedMemory` and `diffMemgraphs`) emits a focused 4-column markdown comparison table (Class | Before | After | Delta) of the actionable rows; other tools fall back to `markdown` for this value.","enum":["markdown","json","both","verify-fix-table"],"type":"string"},"tracePath":{"description":"Absolute path to a `.trace` bundle recorded with the App Launch template (`xcrun xctrace record --template 'App Launch' --launch <bundleId>`).","minLength":1,"type":"string"}},"required":["tracePath"],"type":"object"},"name":"analyzeAppLaunch","title":"Analyze cold/warm launch breakdown"},{"description":"[mg.trace] Parse the `network-connections` schema from a `.trace` recorded with a Network template. Returns per-request URL/host, method, status code, response time, bytes in/out. Top-N rankings by duration (which calls blocked the user) and by bytes (which calls bloat the budget) plus per-host aggregates surfacing chatty SDKs. v1.14+.","execution":{"taskSupport":"forbidden"},"inputSchema":{"$schema":"http://json-schema.org/draft-07/schema#","additionalProperties":false,"properties":{"minBytes":{"default":0,"description":"Filter out connections that transferred fewer than this many bytes (in + out combined). Useful for cutting tiny pings out of the by-bytes view.","minimum":0,"type":"number"},"outputFormat":{"description":"Response format. Omitted or `json` (default, preserves v1.8 behavior) returns JSON.stringify of the result. `markdown` renders a human-readable view of the same data. `both` returns both content items in one response, so a client can display markdown to the user and parse JSON for the agent loop without a second call. `verify-fix-table` (v1.10, applies to `analyzeAbandonedMemory` and `diffMemgraphs`) emits a focused 4-column markdown comparison table (Class | Before | After | Delta) of the actionable rows; other tools fall back to `markdown` for this value.","enum":["markdown","json","both","verify-fix-table"],"type":"string"},"topN":{"default":10,"description":"Return the top N rows for each ranking dimension (by-duration + by-bytes). Default 10.","exclusiveMinimum":0,"type":"integer"},"tracePath":{"description":"Absolute path to a `.trace` bundle recorded with a Network template (`xcrun xctrace record --template 'Network Profile' --attach <app|pid>`).","minLength":1,"type":"string"}},"required":["tracePath"],"type":"object"},"name":"analyzeNetworkActivity","title":"Analyze HTTP / connection activity from a Network trace"},{"description":"[mg.trace] Parse the `memory-footprint` schema from a `.trace` recorded with Allocations or System Trace template. Returns peak resident bytes (RAM in use), peak dirty bytes (the OOM-kill discriminator on iOS), peak VM regions, per-sample timeline. Distinct from analyzeAllocations (cumulative malloc bytes by category). Use when investigating 'why is my app getting jetsam-killed?'. v1.15+.","execution":{"taskSupport":"forbidden"},"inputSchema":{"$schema":"http://json-schema.org/draft-07/schema#","additionalProperties":false,"properties":{"outputFormat":{"description":"Response format. Omitted or `json` (default, preserves v1.8 behavior) returns JSON.stringify of the result. `markdown` renders a human-readable view of the same data. `both` returns both content items in one response, so a client can display markdown to the user and parse JSON for the agent loop without a second call. `verify-fix-table` (v1.10, applies to `analyzeAbandonedMemory` and `diffMemgraphs`) emits a focused 4-column markdown comparison table (Class | Before | After | Delta) of the actionable rows; other tools fall back to `markdown` for this value.","enum":["markdown","json","both","verify-fix-table"],"type":"string"},"topN":{"default":10,"description":"Return the top N memory snapshots ranked by resident bytes (default 10).","exclusiveMinimum":0,"type":"integer"},"tracePath":{"description":"Absolute path to a `.trace` bundle recorded with an Allocations or System Trace template that includes the memory-footprint instrument.","minLength":1,"type":"string"}},"required":["tracePath"],"type":"object"},"name":"analyzeMemoryFootprint","title":"Analyze process VM footprint (resident / dirty / virtual)"},{"description":"[mg.trace] Parse the `energy-impact` schema from a `.trace` recorded with an Energy Log template. Returns per-sample bucket classification (idle / passive / active / high), aggregate wakeup count, active-state ratio, top-N samples by energy cost. The 'why is my app draining battery?' investigation. Distinct from analyzeTimeProfile (CPU sampling); reads the OS power-management subsystem directly. v1.15+.","execution":{"taskSupport":"forbidden"},"inputSchema":{"$schema":"http://json-schema.org/draft-07/schema#","additionalProperties":false,"properties":{"outputFormat":{"description":"Response format. Omitted or `json` (default, preserves v1.8 behavior) returns JSON.stringify of the result. `markdown` renders a human-readable view of the same data. `both` returns both content items in one response, so a client can display markdown to the user and parse JSON for the agent loop without a second call. `verify-fix-table` (v1.10, applies to `analyzeAbandonedMemory` and `diffMemgraphs`) emits a focused 4-column markdown comparison table (Class | Before | After | Delta) of the actionable rows; other tools fall back to `markdown` for this value.","enum":["markdown","json","both","verify-fix-table"],"type":"string"},"topN":{"default":10,"description":"Return the top N samples ranked by energy cost descending (default 10).","exclusiveMinimum":0,"type":"integer"},"tracePath":{"description":"Absolute path to a `.trace` bundle recorded with an Energy Log template that includes the energy-impact instrument.","minLength":1,"type":"string"}},"required":["tracePath"],"type":"object"},"name":"analyzeEnergyImpact","title":"Analyze energy use / battery drain from an Energy Log trace"},{"description":"[mg.trace] Parse the `leaks` schema from a `.trace` recorded with a Leaks template. Distinct from leaks(1) CLI (snapshot): this is a time series of leak events captured throughout the recording. Returns per-class first-seen-at timestamp, peak instance count, peak bytes, event count. Useful for answering 'when in the timeline did the leak appear?' which the snapshot CLI cannot. v1.15+.","execution":{"taskSupport":"forbidden"},"inputSchema":{"$schema":"http://json-schema.org/draft-07/schema#","additionalProperties":false,"properties":{"outputFormat":{"description":"Response format. Omitted or `json` (default, preserves v1.8 behavior) returns JSON.stringify of the result. `markdown` renders a human-readable view of the same data. `both` returns both content items in one response, so a client can display markdown to the user and parse JSON for the agent loop without a second call. `verify-fix-table` (v1.10, applies to `analyzeAbandonedMemory` and `diffMemgraphs`) emits a focused 4-column markdown comparison table (Class | Before | After | Delta) of the actionable rows; other tools fall back to `markdown` for this value.","enum":["markdown","json","both","verify-fix-table"],"type":"string"},"topN":{"default":10,"description":"Return the top N leaked classes ranked by peak instance count (default 10).","exclusiveMinimum":0,"type":"integer"},"tracePath":{"description":"Absolute path to a `.trace` bundle recorded with a Leaks template.","minLength":1,"type":"string"}},"required":["tracePath"],"type":"object"},"name":"analyzeLeakTimeline","title":"Analyze leaks as a time series (xctrace Leaks instrument)"},{"description":"[mg.build] Open Instruments.app, prompt the user to record + save a .trace, then poll a watchDir for the new bundle and chain into inspectTrace. The macOS 26.x escape hatch: `xcrun xctrace record` wedges on this OS but Instruments.app GUI still produces valid traces. Returns instructions[] for the user-in-loop step, tracePath when found, plus a chained inspectTrace summary. Times out after `timeoutSec` (default 600s). v1.16+.","execution":{"taskSupport":"forbidden"},"inputSchema":{"$schema":"http://json-schema.org/draft-07/schema#","additionalProperties":false,"properties":{"preexistingTraces":{"description":"Absolute paths to `.trace` bundles already in `watchDir`. The watcher excludes these so it only matches NEW files. When omitted, the watcher snapshots the directory at start. Optional override for callers who want explicit control.","items":{"type":"string"},"type":"array"},"template":{"default":"Time Profiler","description":"The Instruments template the user should pick after the app launches. Surfaced in the response's instructions array. Default 'Time Profiler'. Common alternatives: 'Allocations', 'Animation Hitches', 'Leaks', 'Energy Log', 'Network Profile'.","type":"string"},"timeoutSec":{"default":600,"description":"Maximum seconds to wait for the user to save a `.trace` before returning a timeout. Default 600 (10 minutes). Capped at 3600 (1 hour).","exclusiveMinimum":0,"maximum":3600,"type":"integer"},"watchDir":{"description":"Directory to watch for the saved `.trace` bundle. When omitted, defaults to $MEMORYDETECTIVE_TRACE_ROOT (typically `~/Library/Application Support/memorydetective/traces`). The directory is created if it does not exist.","type":"string"}},"type":"object"},"name":"recordViaInstrumentsApp","title":"Record a .trace via Instruments.app GUI (macOS 26.x workaround)"},{"description":"[mg.production] Parse Apple MetricKit `.mxdiagnostic` payloads from real-device TestFlight / App Store builds. Aggregates crashes (clustered by exception type / binary / top frame), hang hotspots (sorted by duration, with localized-string handling for `hangDuration`), CPU exceptions, and disk-write exceptions. Inputs: payloadPath (single file), payloadDir (aggregate across files), or payloadJson (raw). Each output entry includes the raw binaryUUID + offset for downstream dSYM symbolication. Returns 3 most-actionable sections + cross-tool chain hints (e.g. `objc_release` top frame -> findCycles, sqlite top frame -> analyzeHangs with main-thread-violation classifier). No symbolication in v1; that's a separate tool. Simulator does NOT generate MetricKit payloads (Apple-side limitation) — frame this as post-mortem analysis. New in v1.18.","execution":{"taskSupport":"forbidden"},"inputSchema":{"$schema":"http://json-schema.org/draft-07/schema#","additionalProperties":false,"properties":{"groupBy":{"default":"exception-type","description":"Clustering key for `crashCluster[]`. `exception-type` groups by exceptionType + signal (catches mass-crash on the same OS-level fault). `binary` groups by the top frame's binary name (catches crashes localized to one dylib/framework). `top-frame` groups by binary + offset (the most granular). Default `exception-type`.","enum":["exception-type","binary","top-frame"],"type":"string"},"payloadDir":{"description":"Absolute path to a directory containing one or more `.mxdiagnostic` files. The tool walks the dir non-recursively and aggregates findings across all payloads.","minLength":1,"type":"string"},"payloadJson":{"description":"Raw `.mxdiagnostic` JSON string. For in-memory callers and tests; if both `payloadPath` and `payloadJson` are provided, `payloadJson` wins.","minLength":1,"type":"string"},"payloadPath":{"description":"Absolute path to a single `.mxdiagnostic` file (the JSON Apple's MetricKit writes to the app's MetricKit directory on real-device builds).","minLength":1,"type":"string"},"topN":{"default":10,"description":"Cap on `crashCluster[]` / `hangHotspots[]` / `cpuExceptions[]` / `diskWriteExceptions[]` length. Default 10.","exclusiveMinimum":0,"type":"integer"}},"type":"object"},"name":"analyzeMetricKitPayload","title":"Analyze a .mxdiagnostic payload from MetricKit (production diagnostics)"},{"description":"[mg.render] Read a `.memgraph`, pick a ROOT CYCLE by index, and emit the chain as a Mermaid graph definition (default — embeddable in markdown / GitHub) or a Graphviz DOT file. App-level classes are highlighted; CYCLE BACK terminators are styled distinctly. Use `cycleIndex` to render cycles other than the first.","execution":{"taskSupport":"forbidden"},"inputSchema":{"$schema":"http://json-schema.org/draft-07/schema#","additionalProperties":false,"properties":{"cycleIndex":{"default":0,"description":"Zero-based index of the ROOT CYCLE to render (default 0 = the first cycle, usually the largest).","minimum":0,"type":"integer"},"format":{"default":"mermaid","description":"Output format: `mermaid` (GitHub-renderable, embeddable in markdown) or `dot` (Graphviz format).","enum":["mermaid","dot"],"type":"string"},"maxDepth":{"default":8,"description":"Truncate the rendered graph beyond this chain depth (default 8).","exclusiveMinimum":0,"type":"integer"},"path":{"description":"Absolute path to a `.memgraph` file.","minLength":1,"type":"string"},"truncateClassName":{"default":60,"description":"Truncate long generic SwiftUI class names to this many characters (default 60). The full name still appears in node IDs.","exclusiveMinimum":0,"type":"integer"}},"required":["path"],"type":"object"},"name":"renderCycleGraph","title":"Render a retain cycle as Mermaid or DOT graph"},{"description":"[mg.log] Wrap `log show --style compact --last <window>` with optional NSPredicate filter, process and subsystem sugar. Returns parsed entries (timestamp, type, process, pid, subsystem, category, message) bounded by `maxEntries`. Use this to look back at app logs without leaving chat.","execution":{"taskSupport":"forbidden"},"inputSchema":{"$schema":"http://json-schema.org/draft-07/schema#","additionalProperties":false,"properties":{"last":{"default":"5m","description":"Time window to look back from now (e.g. \"30s\", \"5m\", \"1h\", \"2d\"). Default 5m.","type":"string"},"level":{"default":"default","description":"Minimum log level. `default` = default+error+fault. `info` adds info-level. `debug` adds info+debug.","enum":["default","info","debug"],"type":"string"},"maxEntries":{"default":500,"description":"Cap on parsed entries returned (default 500). Output is truncated to the first N matching.","exclusiveMinimum":0,"type":"integer"},"predicate":{"description":"NSPredicate-style filter passed to `log show --predicate`. Examples: `process == \"DemoApp\"`, `subsystem == \"com.example.app\"`, `messageType == error`.","type":"string"},"process":{"description":"Filter to a single process name. Sugar over `--predicate process == \"<name>\"`.","type":"string"},"subsystem":{"description":"Filter to a single subsystem identifier.","type":"string"}},"type":"object"},"name":"logShow","title":"Query macOS unified logging (one-shot)"},{"description":"[mg.log] Wrap `log stream --style compact` for a bounded duration (≤60 s — MCP requests should not block longer). Returns parsed entries collected during the window. Useful for capturing a specific user flow without setting up a full Console.app session.","execution":{"taskSupport":"forbidden"},"inputSchema":{"$schema":"http://json-schema.org/draft-07/schema#","additionalProperties":false,"properties":{"durationSec":{"default":10,"description":"How long to listen for log entries (max 60 seconds — MCP requests should not block longer). Default 10.","exclusiveMinimum":0,"maximum":60,"type":"integer"},"level":{"default":"default","enum":["default","info","debug"],"type":"string"},"maxEntries":{"default":500,"exclusiveMinimum":0,"type":"integer"},"predicate":{"type":"string"},"process":{"type":"string"},"subsystem":{"type":"string"}},"type":"object"},"name":"logStream","title":"Stream macOS unified logging for a bounded window"},{"description":"[mg.ci] Build the workspace for testing, launch the test cycle, capture a baseline `.memgraph` once the app appears, run the test to completion, capture an after `.memgraph`, and diff. Returns `passed: false` when new ROOT CYCLE blocks appear that aren't in the `allowlistPatterns` list. Designed for CI gating: non-zero exit code on failure.","execution":{"taskSupport":"forbidden"},"inputSchema":{"$schema":"http://json-schema.org/draft-07/schema#","additionalProperties":false,"properties":{"allowlistPatterns":{"default":[],"description":"Substrings of class names that are allowed to leak. Examples: pre-existing SwiftUI internals you can't fix, third-party SDK leaks. Cycles whose root class contains any of these substrings won't fail the run.","items":{"type":"string"},"type":"array"},"appName":{"description":"App process name as it appears in `pgrep -x` (e.g. \"DemoApp\").","minLength":1,"type":"string"},"destination":{"default":"platform=iOS Simulator,name=iPhone 11,OS=latest","description":"xcodebuild destination string. Default targets the most common iOS Simulator profile.","type":"string"},"outputDir":{"default":"/tmp/memorydetective-xcuitest","description":"Directory where the baseline + after `.memgraph` snapshots are written.","type":"string"},"outputHtmlPath":{"description":"Absolute path to write a self-contained HTML report (inline CSS, no external assets). When set, the response also gains an `htmlReportPath` field pointing at the same file. Designed for CI artifact upload + PR-comment attachment.","type":"string"},"scheme":{"description":"Xcode scheme that builds and runs the XCUITest target.","minLength":1,"type":"string"},"skipBuild":{"default":false,"description":"Skip the build-for-testing step (faster on CI when the build is already cached).","type":"boolean"},"testIdentifier":{"description":"XCUITest identifier in `<TestTarget>/<TestClass>/<testMethod>` form. Passed to `-only-testing` so we run exactly one test cycle.","minLength":1,"type":"string"},"workspace":{"description":"Path to the .xcworkspace or .xcodeproj for the project.","minLength":1,"type":"string"}},"required":["workspace","scheme","testIdentifier","appName"],"type":"object"},"name":"detectLeaksInXCUITest","title":"Run an XCUITest with leak detection (CI-runnable)"},{"description":"[mg.ci] Sibling to `detectLeaksInXCUITest`, targeting XCTest unit-test schemes. Build for testing, launch the test bundle with an optional `-only-testing:<TestTarget>/<TestClass>[/<testMethod>]` filter, poll for the runner process (`xctest` by default, configurable via `processName` for app-hosted test bundles), capture a baseline `.memgraph` once the runner appears, run the test to completion, capture an after `.memgraph`, and diff. Returns `passed: false` when new ROOT CYCLE blocks appear that are not in the `allowlistPatterns` list. Per-test granularity: call once per test method with different `testCaseFilter` values; aggregation is the caller's responsibility, keeping the response tied to a single, well-defined before/after pair. If the runner exits before the after-capture window (common for fast unit tests with no host), the response carries an explicit `failureReason` pointing at the `tearDown` workaround. Designed for CI gating: non-zero exit code on failure.","execution":{"taskSupport":"forbidden"},"inputSchema":{"$schema":"http://json-schema.org/draft-07/schema#","additionalProperties":false,"properties":{"allowlistPatterns":{"default":[],"description":"Substrings of class names that are allowed to leak. Cycles whose root class contains any of these substrings will not fail the run.","items":{"type":"string"},"type":"array"},"destination":{"default":"platform=iOS Simulator,name=iPhone 11,OS=latest","description":"xcodebuild destination string. Default targets the most common iOS Simulator profile.","type":"string"},"outputDir":{"default":"/tmp/memorydetective-xctest","description":"Directory where the baseline + after `.memgraph` snapshots are written.","type":"string"},"outputHtmlPath":{"description":"Absolute path to write a self-contained HTML report (inline CSS, no external assets). When set, the response also gains an `htmlReportPath` field pointing at the same file. Designed for CI artifact upload + PR-comment attachment.","type":"string"},"processName":{"default":"xctest","description":"Process name to attach `leaks` against. `xctest` is the default unit-test runner on the simulator. If your tests are hosted in an app, pass the host app's process name instead (the same value `pgrep -x` would match).","type":"string"},"project":{"description":"Path to the `.xcodeproj`. Mutually exclusive with `workspace`.","minLength":1,"type":"string"},"runnerStartTimeoutMs":{"default":300000,"description":"How long to wait for the test runner process to appear under `pgrep -x <processName>` before giving up. Default 5 minutes.","exclusiveMinimum":0,"type":"integer"},"scheme":{"description":"Xcode scheme that builds and runs the XCTest unit-test target.","minLength":1,"type":"string"},"skipBuild":{"default":false,"description":"Skip the `build-for-testing` step (faster on CI when the build is cached).","type":"boolean"},"testCaseFilter":{"description":"Optional `-only-testing` filter in `<TestTarget>/<TestClass>` or `<TestTarget>/<TestClass>/<testMethod>` form. Omit to run every test in the scheme (slower; produces one before/after pair for the entire run).","minLength":1,"type":"string"},"workspace":{"description":"Path to the `.xcworkspace`. Mutually exclusive with `project`.","minLength":1,"type":"string"}},"required":["scheme"],"type":"object"},"name":"detectLeaksInXCTest","title":"Run an XCTest unit-test bundle with leak detection (CI-runnable)"},{"description":"[mg.memory] Cycle-scoped reachability + class counting. Answers questions like \"how many `NSURLSessionConfiguration` instances are reachable from the cycle rooted at `DetailViewModel`?\" — distinguishing the actual culprit (the cycle root) from its retained dependencies. Pick a cycle by zero-based `cycleIndex` or by `rootClassName` substring. Returns per-class counts ranked by occurrence, plus the total reachable node count.","execution":{"taskSupport":"forbidden"},"inputSchema":{"$schema":"http://json-schema.org/draft-07/schema#","additionalProperties":false,"properties":{"className":{"description":"Optional filter — only count nodes whose className contains this substring. When omitted, returns the full per-class breakdown.","type":"string"},"cycleIndex":{"description":"Zero-based index of the ROOT CYCLE to scope to. Mutually exclusive with `rootClassName`. When neither is given, defaults to cycle index 0.","minimum":0,"type":"integer"},"path":{"description":"Absolute path to a `.memgraph` file.","minLength":1,"type":"string"},"rootClassName":{"description":"Substring of the root cycle's class name (e.g. \"DetailViewModel\"). Picks the first ROOT CYCLE whose root matches. Mutually exclusive with `cycleIndex`.","type":"string"},"topN":{"default":20,"description":"Cap on per-class entries returned (default 20).","exclusiveMinimum":0,"maximum":100,"type":"integer"},"verbosity":{"default":"compact","description":"Class-name verbosity for the response. See analyzeMemgraph for the same flag.","enum":["compact","normal","full"],"type":"string"}},"required":["path"],"type":"object"},"name":"reachableFromCycle","title":"Count instances reachable from a specific cycle root"},{"description":"[mg.code] Find the file:line where a Swift symbol (class, struct, enum, protocol, func, var, etc.) is declared. Pre-scans `candidatePaths` (or `hint.filePath`) with a fast regex first, then asks SourceKit-LSP for jump-to-definition. Returns the position even when LSP can't follow through. Use after `findRetainers` / `classifyCycle` surface a class name from a memgraph cycle to land in the actual source file.","execution":{"taskSupport":"forbidden"},"inputSchema":{"$schema":"http://json-schema.org/draft-07/schema#","additionalProperties":false,"properties":{"candidatePaths":{"description":"If provided, search these files for the symbol declaration before asking SourceKit-LSP. Speeds up location when the agent already has a guess (e.g. from `findSymbolReferences` or `swift_search_pattern`).","items":{"type":"string"},"type":"array"},"hint":{"additionalProperties":false,"description":"Optional hint to speed up the search. `filePath` skips the project scan; `module` is reserved for future multi-module work.","properties":{"filePath":{"type":"string"},"module":{"type":"string"}},"type":"object"},"projectRoot":{"description":"Override the project root. Default discovers the nearest Package.swift / .xcodeproj / .xcworkspace from the cwd.","type":"string"},"symbolName":{"description":"Name of the Swift symbol to locate (class, struct, enum, protocol, func, var, etc.).","minLength":1,"type":"string"}},"required":["symbolName"],"type":"object"},"name":"swiftGetSymbolDefinition","title":"Locate a Swift symbol's source declaration"},{"description":"[mg.code] Locates the symbol's declaration in `filePath`, then asks SourceKit-LSP for `textDocument/references`. Returns every callsite + capture across the project, with a snippet of each line. **Requires an IndexStoreDB** at `<projectRoot>/.build/index/store` for cross-file references — build it with `swift build -Xswiftc -index-store-path -Xswiftc <projectRoot>/.build/index/store`. The result includes a `needsIndex: true` hint when the index is missing.","execution":{"taskSupport":"forbidden"},"inputSchema":{"$schema":"http://json-schema.org/draft-07/schema#","additionalProperties":false,"properties":{"filePath":{"description":"Path to a Swift file where the symbol is declared. The LSP query needs a position; we locate it in this file via a regex pre-scan.","minLength":1,"type":"string"},"includeDeclaration":{"default":true,"description":"Include the declaration site itself in the result set.","type":"boolean"},"projectRoot":{"description":"Override the project root. Default discovers the nearest Package.swift / .xcodeproj / .xcworkspace.","type":"string"},"symbolName":{"description":"Name of the Swift symbol to find references for.","minLength":1,"type":"string"}},"required":["symbolName","filePath"],"type":"object"},"name":"swiftFindSymbolReferences","title":"Find every reference to a Swift symbol"},{"description":"[mg.code] Cheap orientation: returns the top-level symbols (classes, structs, enums, protocols, free functions) declared in a Swift file via SourceKit-LSP's `documentSymbol`. Set `topLevelOnly: false` for nested children too. Useful right after `swiftGetSymbolDefinition` lands you in a new file.","execution":{"taskSupport":"forbidden"},"inputSchema":{"$schema":"http://json-schema.org/draft-07/schema#","additionalProperties":false,"properties":{"filePath":{"description":"Absolute path to a Swift source file.","minLength":1,"type":"string"},"projectRoot":{"type":"string"},"topLevelOnly":{"default":true,"description":"Return only top-level symbols (classes, structs, enums, protocols, free functions). When false, returns nested children too. Default true keeps responses small.","type":"boolean"}},"required":["filePath"],"type":"object"},"name":"swiftGetSymbolsOverview","title":"List top-level symbols in a Swift file"},{"description":"[mg.code] SourceKit-LSP `textDocument/hover` at a (line, character) position. Returns the markdown / plaintext hover content plus a best-effort extracted declaration fragment. Use to disambiguate `self` captures: a class self in a closure can leak; a struct self can't.","execution":{"taskSupport":"forbidden"},"inputSchema":{"$schema":"http://json-schema.org/draft-07/schema#","additionalProperties":false,"properties":{"character":{"description":"Zero-based UTF-16 character offset within the line.","minimum":0,"type":"integer"},"filePath":{"description":"Absolute path to a Swift source file.","minLength":1,"type":"string"},"line":{"description":"Zero-based line number (LSP convention).","minimum":0,"type":"integer"},"projectRoot":{"type":"string"}},"required":["filePath","line","character"],"type":"object"},"name":"swiftGetHoverInfo","title":"Get type info / docs at a Swift source position"},{"description":"[mg.code] Pure regex search over a file's contents — no SourceKit-LSP, no IndexStoreDB. Catches what LSP misses: closure capture lists (`[weak self]`, `[unowned self]`), `Task { ... self ... }` blocks, and any other pattern the agent constructs from a leak chain. Returns matches with line/character positions and a trimmed snippet.","execution":{"taskSupport":"forbidden"},"inputSchema":{"$schema":"http://json-schema.org/draft-07/schema#","additionalProperties":false,"properties":{"filePath":{"description":"Absolute path to a Swift source file.","minLength":1,"type":"string"},"flags":{"description":"Additional RegExp flags (\"i\", \"m\", \"s\", \"im\", etc.).","type":"string"},"maxMatches":{"default":50,"description":"Cap on matches returned (default 50).","exclusiveMinimum":0,"maximum":500,"type":"integer"},"pattern":{"description":"Regex pattern (JavaScript flavour). The `g` flag is implied — every match is returned.","minLength":1,"type":"string"}},"required":["filePath","pattern"],"type":"object"},"name":"swiftSearchPattern","title":"Regex-search a Swift file (no LSP)"},{"description":"[meta] Returns a versioned, declarative pipeline for a known investigation flow (`memgraph-leak`, `perf-hangs`, `ui-jank`, `app-launch-slow`, `verify-fix`). Each step has a tool name, purpose, and argsTemplate. Use this once at the start of an investigation so any LLM agent can follow the right sequence without rediscovering it from individual tool descriptions.","execution":{"taskSupport":"forbidden"},"inputSchema":{"$schema":"http://json-schema.org/draft-07/schema#","additionalProperties":false,"properties":{"kind":{"description":"Which investigation flow to return. `memgraph-leak` is the most common — diagnose a SwiftUI/Combine retain cycle from a `.memgraph` and locate it in source.","enum":["memgraph-leak","perf-hangs","ui-jank","app-launch-slow","verify-fix"],"type":"string"}},"required":["kind"],"type":"object"},"name":"getInvestigationPlaybook","title":"Get the canonical tool sequence for a known investigation kind"},{"description":"[mg.memory] Cycle-semantic diff. Classifies both `before` and `after` `.memgraph` snapshots and emits a per-pattern PASS/PARTIAL/FAIL verdict plus bytes freed and instances released. Use as a CI gate: if `expectedPatternId` is provided, `expectedPatternVerdict` tells you in one field whether the fix landed.\n\nPipeline: this is the natural followup to `classifyCycle` after you've shipped a fix. Capture a fresh `.memgraph`, point this at the before/after pair.","execution":{"taskSupport":"forbidden"},"inputSchema":{"$schema":"http://json-schema.org/draft-07/schema#","additionalProperties":false,"properties":{"after":{"description":"Absolute path to the post-fix `.memgraph`.","minLength":1,"type":"string"},"before":{"description":"Absolute path to the baseline `.memgraph` (pre-fix).","minLength":1,"type":"string"},"disableDefaultWhitelist":{"default":false,"description":"v1.14+. When true, the curated DEFAULT_EXPECTED_ALIVE_CLASSES list is NOT applied. Only the user-supplied expectedAliveClasses (if any) is used. Useful for strict regression mode in tests where every alive class should be evaluated.","type":"boolean"},"expectedAliveClasses":{"description":"v1.14+. Class names that legitimately stay alive across the before/after snapshots. Singletons, framework registrars, persistent caches. When a class in this list appears in regressionClasses[], it is moved to expectedAlive[] and does not flip the verdict to FAIL.\n\nEach entry can be a plain string (treated as case-insensitive substring, the v1.14 default behavior) OR an object `{ pattern: string, mode?: \"exact\" | \"substring\" | \"regex\" }` (v1.17+). Modes:\n- `exact`: case-insensitive full-string equality. Use for system class names that are stable.\n- `substring`: case-insensitive substring match (the v1.14 default).\n- `regex`: JavaScript regex (anchors / flags as written in the pattern). Use for nuanced class-name shapes.\n\nMerged with the curated default list (DebugSwift's ignoredViewControllerClassNames + ignoredViewClassNames + ignoredWindowClassNames, all `mode: \"exact\"`) unless `disableDefaultWhitelist: true`.","items":{"anyOf":[{"minLength":1,"type":"string"},{"additionalProperties":false,"properties":{"mode":{"default":"substring","enum":["exact","substring","regex"],"type":"string"},"pattern":{"minLength":1,"type":"string"}},"required":["pattern"],"type":"object"}]},"type":"array"},"expectedPatternId":{"description":"If provided, the verdict is gated on whether this specific patternId disappeared from `after`. Defaults to checking every classified pattern.","type":"string"},"verbosity":{"default":"compact","enum":["compact","normal","full"],"type":"string"}},"required":["before","after"],"type":"object"},"name":"verifyFix","title":"Verify a fix actually closed the targeted retain cycle"},{"description":"[mg.trace][mg.ci] Trace-side counterpart to `verifyFix`. Compares two `.trace` bundles for a specific perf category (`hangs`, `animation-hitches`, or `app-launch`) and emits a PASS/PARTIAL/FAIL verdict plus before/after stats and deltas. Apply thresholds: hangs PASS when longest is below `hangsMaxLongestMs` (default 0); hitches PASS when longest is below `hitchesMaxLongestMs` (default 100ms — Apple's user-perceptible threshold); app-launch PASS when total is below `appLaunchMaxTotalMs` (default 1000ms).\n\nPipeline: capture before/after `.trace` (via `recordTimeProfile` or Xcode), then point this at the pair. The natural followup to a hangs/jank/launch fix PR.","execution":{"taskSupport":"forbidden"},"inputSchema":{"$schema":"http://json-schema.org/draft-07/schema#","additionalProperties":false,"properties":{"after":{"description":"Absolute path to the post-fix `.trace`.","minLength":1,"type":"string"},"before":{"description":"Absolute path to the baseline `.trace` (pre-fix).","minLength":1,"type":"string"},"category":{"description":"Which perf category to verify. `hangs` parses the `potential-hangs` schema, `animation-hitches` parses `animation-hitches`, `app-launch` parses the launch breakdown.","enum":["hangs","animation-hitches","app-launch"],"type":"string"},"hangsMinDurationMs":{"default":250,"description":"For `category: hangs` — only count hangs longer than this. Default 250ms (Apple's user-perceptible threshold for hangs).","minimum":0,"type":"number"},"hitchesMinDurationMs":{"default":100,"description":"For `category: animation-hitches` — only count hitches longer than this. Default 100ms (Apple's user-perceptible threshold).","minimum":0,"type":"number"},"thresholds":{"additionalProperties":false,"default":{},"properties":{"appLaunchMaxTotalMs":{"description":"For `category: app-launch` — PASS requires `after.totalMs <= this`. Default 1000 (1 second total cold-launch budget).","minimum":0,"type":"number"},"hangsMaxLongestMs":{"description":"For `category: hangs` — PASS requires `after.longestMs <= this`. Default 0 (i.e. PASS only when no hangs remain).","minimum":0,"type":"number"},"hitchesMaxLongestMs":{"description":"For `category: animation-hitches` — PASS requires `after.longestMs <= this`. Default 100 (Apple's user-perceptible threshold).","minimum":0,"type":"number"}},"type":"object"}},"required":["before","after","category"],"type":"object"},"name":"compareTracesByPattern","title":"Compare before/after .trace bundles for a perf regression target"}]}}}
