chrome-devtools-mcp query_heapsnapshot_objects
Introduced 2026-08-25 · score 0.93
HOW TO USE IT
When investigating memory use or detached DOM nodes, start chrome-devtools-mcp with memory debugging enabled, then call `query_heapsnapshot_objects` on a `.heapsnapshot` file with the needed filters and pagination.
query_heapsnapshot_objects({"filePath":"<path>.heapsnapshot","className":"<class name or regex>","isDetached":true,"pageIdx":0,"pageSize":20})query_heapsnapshot_objects({"filePath":"<path>.heapsnapshot","propertyName":"<property>","nodeType":"<V8 node type>","minRetainedSize":<bytes>,"maxRetainedSize":<bytes>,"minSelfSize":<bytes>,"maxSelfSize":<bytes>,"sortBy":"retainedSize","pageIdx":0,"pageSize":20})npx chrome-devtools-mcp@1.8.0 --memoryDebugging=trueWHY THIS HELPS
Filter and sort objects in a heap snapshot while investigating memory use or detached DOM nodes.
REQUIREMENTS AND LIMITATIONS
- Version: 1.8.0
- filePath (required): Path to a `.heapsnapshot` file to read.
- className: Regex or text matching the object class name.
- propertyName: Filter on outgoing reference edge property name.
- nodeType: V8 node type filter, e.g. object, closure, string, array, code.
- isDetached: Filter for detached DOM nodes.
- minRetainedSize: Minimum retained size in bytes.
- maxRetainedSize: Maximum retained size in bytes.
- minSelfSize: Minimum self size in bytes.
- maxSelfSize: Maximum self size in bytes.
- pageIdx: Page index for pagination.
- pageSize: Page size for pagination.
- sortBy: Sort by `retainedSize`, `selfSize`, or `id`; defaults to `retainedSize`.
- Prerequisite: Start the server with `--memoryDebugging=true` to enable this tool.
- Prerequisite: Supply a `.heapsnapshot` file path.
- `filePath` must point to a `.heapsnapshot` file.
- `sortBy` accepts `retainedSize`, `selfSize`, or `id`; it defaults to `retainedSize`.
- Size filters are measured in bytes.
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/2553
- https://github.com/ChromeDevTools/chrome-devtools-mcp/blob/fadbf41d96db84cea12e379592bc13b005c053b4/docs/tool-reference.md
Check the installed version and the source before using it. Entry JSON