Skip to main content
Glama
carloshpdoc

memorydetective

Analyze a .mxdiagnostic payload from MetricKit (production diagnostics)

analyzeMetricKitPayload

Parse Apple MetricKit .mxdiagnostic payloads to aggregate crashes, hang hotspots, and exceptions from real-device builds, with clustered results and symbolication offsets.

Instructions

[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.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
payloadPathNoAbsolute path to a single `.mxdiagnostic` file (the JSON Apple's MetricKit writes to the app's MetricKit directory on real-device builds).
payloadDirNoAbsolute path to a directory containing one or more `.mxdiagnostic` files. The tool walks the dir non-recursively and aggregates findings across all payloads.
payloadJsonNoRaw `.mxdiagnostic` JSON string. For in-memory callers and tests; if both `payloadPath` and `payloadJson` are provided, `payloadJson` wins.
topNNoCap on `crashCluster[]` / `hangHotspots[]` / `cpuExceptions[]` / `diskWriteExceptions[]` length. Default 10.
groupByNoClustering 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`.exception-type
Behavior4/5

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

The description discloses aggregation logic, raw binaryUUID+offset inclusion, localized-string handling, and limitations (no symbolication, simulator limitation). However, it does not explicitly state that the tool is read-only or has no side effects. With no annotations, this is a minor gap.

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?

The description is relatively long but well-structured, with each sentence providing useful context. A minor reduction could improve conciseness, but it remains effective without redundancy.

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

Completeness4/5

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

The description covers input parameters, output structure (three sections, raw binaryUUID+offset, cross-tool hints), and limitations. It does not detail error handling or invalid payloads, but given the complexity, it provides sufficient completeness for effective use.

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

Parameters5/5

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

The schema covers all 5 parameters (100% coverage). The description adds significant value by explaining the behavior of each parameter, such as the precedence rule for payloadJson over payloadPath, aggregation behavior of payloadDir, and detailed explanation of groupBy enum options with clustering criteria.

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 description clearly states the tool parses Apple MetricKit .mxdiagnostic payloads from production builds, aggregates crashes, hang hotspots, CPU exceptions, and disk-write exceptions, and returns three actionable sections with cross-tool chaining hints. It distinguishes from sibling tools like analyzeHangs and findCycles by providing specific hints on when to use them.

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?

The description explicitly states that simulator does not generate MetricKit payloads, so it should be framed as post-mortem analysis. It also clarifies that symbolication is a separate tool and provides cross-tool chaining hints, guiding the agent on when to use this tool versus others.

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

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/carloshpdoc/memorydetective'

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