get_heapsnapshot_details filters by native context
Introduced 2026-08-10 · score 0.97
HOW TO USE IT
When investigating memory use with a loaded heap snapshot, call `get_heapsnapshot_details` with an applicable native-context `filterName` to narrow aggregates. For `attributedToSpecificNativeContext`, also pass that context’s `objectId`.
get_heapsnapshot_details({"filePath":"<path-to-heapsnapshot>","filterName":"sharedNativeContext"})get_heapsnapshot_details({"filePath":"<path-to-heapsnapshot>","filterName":"attributedToSpecificNativeContext","objectId":<context-node-id>})WHY THIS HELPS
Narrow heap snapshot object or aggregate results to a native context while investigating memory use.
REQUIREMENTS AND LIMITATIONS
- Version: 1.7.0
- filePath (required): Path to the .heapsnapshot file to read.
- filterName: Optional aggregate filter. Allowed: objectsRetainedByDetachedDomNodes, objectsRetainedByConsole, objectsRetainedByEventHandlers, objectsRetainedByContexts, sharedNativeContext, noNativeContext, attributedToSpecificNativeContext.
- objectId: Specific native context object ID (nodeId), used when filterName is attributedToSpecificNativeContext.
- Prerequisite: Requires `--memoryDebugging=true`.
- The `filterName` and `objectId` parameters are optional.
- `objectId` is for the `attributedToSpecificNativeContext` filter.
- The documented filters apply to nodes or aggregates.
FIRST-PARTY EVIDENCE
- https://github.com/ChromeDevTools/chrome-devtools-mcp/releases/tag/chrome-devtools-mcp-v1.7.0
- https://github.com/ChromeDevTools/chrome-devtools-mcp/pull/2377
- https://github.com/ChromeDevTools/chrome-devtools-mcp/blob/76fd2424984827802867672fcc8d0e0036f4a3af/docs/tool-reference.md
Check the installed version and the source before using it. Entry JSON