chrome-devtools-mcp adds get_heapsnapshot_retaining_paths
Introduced 2026-06-18 · score 0.97
HOW TO USE IT
When a heap snapshot object is not being garbage collected, use `get_heapsnapshot_retaining_paths` to find its retaining paths to GC roots. Start the MCP server with `--memoryDebugging=true`, then pass the snapshot path and node ID; optionally bound the search with `maxDepth`, `maxNodes`, or `maxSiblings`.
get_heapsnapshot_retaining_paths({"filePath":"<path>.heapsnapshot","nodeId":<node-id>})get_heapsnapshot_retaining_paths({"filePath":"<path>.heapsnapshot","nodeId":<node-id>,"maxDepth":<depth>,"maxNodes":<count>,"maxSiblings":<count>})WHY THIS HELPS
When debugging why a heap snapshot object is not garbage collected, find its retaining paths to the GC roots.
REQUIREMENTS AND LIMITATIONS
- Version: 1.3.0
- filePath (required): Path to a .heapsnapshot file to read.
- nodeId (required): Node ID to get retaining paths for.
- maxDepth: Maximum depth to search for retaining paths.
- maxNodes: Maximum number of nodes to return.
- maxSiblings: Maximum number of siblings to return.
- Prerequisite: Enable memory debugging with `--memoryDebugging=true`.
- Prerequisite: Provide a `.heapsnapshot` file path and a node ID.
- Requires `--memoryDebugging=true`.
- Requires a `.heapsnapshot` file path and a node ID.
FIRST-PARTY EVIDENCE
- https://github.com/ChromeDevTools/chrome-devtools-mcp/releases/tag/chrome-devtools-mcp-v1.3.0
- https://github.com/ChromeDevTools/chrome-devtools-mcp/pull/2187
- https://github.com/ChromeDevTools/chrome-devtools-mcp/blob/chrome-devtools-mcp-v1.3.0/docs/tool-reference.md
Check the installed version and the source before using it. Entry JSON