get_heap_snapshot
Capture a V8 heap snapshot of the main process or a renderer page, saving it to a .heapsnapshot file and returning the file path for analysis in Chrome DevTools Memory panel.
Instructions
Take a V8 heap snapshot of the main process or a renderer page. The snapshot can be large, so it is written to a .heapsnapshot file (loadable in Chrome DevTools Memory panel); the file path is returned.
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"sessionId": "<sessionId>"
},
"name": "get_heap_snapshot"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| pageId | No | Page id from list_pages, or "main" (default) for the main process. | |
| filePath | No | Output file path. Defaults to a file in the system temp dir. | |
| sessionId | Yes | Session id returned by launch_app. |