chrome-devtools-mcp heap snapshot size range filters
Introduced 2026-08-25 · score 0.94
HOW TO USE IT
When filtering heap snapshot objects or outgoing edges by size, pass a size range string to the relevant tool. Enable memory debugging; edge filtering currently applies only the lower bound.
query_heapsnapshot_objects({"filePath":"<snapshot.heapsnapshot>","retainedSize":"1MB-2MB","selfSize":"-1MiB"})get_heapsnapshot_edges({"filePath":"<snapshot.heapsnapshot>","nodeId":<node-id>,"retainedSize":"1MB-"})WHY THIS HELPS
Filter heap snapshot objects and edges by retained or self size while investigating memory use.
REQUIREMENTS AND LIMITATIONS
- Version: 1.8.0
- query_heapsnapshot_objects.filePath (required): Path to the heap snapshot file to read.
- query_heapsnapshot_objects.retainedSize: Inclusive retained-size range for target nodes; a bare size is a minimum.
- query_heapsnapshot_objects.selfSize: Inclusive self-size range; a bare size is a minimum.
- get_heapsnapshot_edges.filePath (required): Path to the heap snapshot file to read.
- get_heapsnapshot_edges.nodeId (required): Node ID whose outgoing edges to return.
- get_heapsnapshot_edges.retainedSize: Inclusive retained-size range for target nodes; only the lower bound is currently applied.
- size range syntax: A single size is a minimum; ranges accept forms such as 1MB-2MB, -1MB, and 1MB-. Supported units include B, KB, KiB, MB, MiB, GB, GiB, TB, and TiB. Object keys are independent filters; docs do not state they are mutually exclusive.
- Prerequisite: Enable memory debugging with --memoryDebugging=true.
- Ranges are inclusive.
- A single value is treated as a minimum.
- The documentation says only the lower bound is currently applied for `get_heapsnapshot_edges`.
FIRST-PARTY EVIDENCE
- https://github.com/ChromeDevTools/chrome-devtools-mcp/releases/tag/chrome-devtools-mcp-v1.8.0
- https://github.com/ChromeDevTools/chrome-devtools-mcp/pull/2589
- https://github.com/ChromeDevTools/chrome-devtools-mcp/blob/61e312f59314907bca32dfeb63cb002601a76cea/docs/tool-reference.md
- https://github.com/ChromeDevTools/chrome-devtools-mcp/blob/61e312f59314907bca32dfeb63cb002601a76cea/src/utils/bytes.ts
Check the installed version and the source before using it. Entry JSON