Diff two memgraph snapshots
diffMemgraphsCompare baseline and comparison .memgraph files to detect memory leak fixes by analyzing byte deltas, class count changes, and root cycle signatures.
Instructions
[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.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| before | Yes | Absolute path to the baseline `.memgraph` file. | |
| after | Yes | Absolute path to the comparison `.memgraph` file. | |
| outputFormat | No | 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. |