Take heap snapshot
take_memory_snapshotCapture a V8 heap snapshot to a file for memory-leak debugging. Take snapshots before and after a suspect interaction, then compare retained objects in Chrome DevTools.
Instructions
Capture a V8 heap snapshot of the page, for memory-leak debugging.
Writes the raw .heapsnapshot file for Chrome DevTools -> Memory -> Load. The usual workflow is two snapshots taken around a suspect interaction, then comparing retained objects between them.
On a heavy page a snapshot can be hundreds of megabytes and take several seconds; the response reports the resulting file size.
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": {
"file_path": "<file_path>"
},
"name": "take_memory_snapshot"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| browser | No | Which browser to act on. Each name is an independent Chrome, created on first use. Omit for the shared default; parallel agents each need their own name. | default |
| file_path | Yes | Local path to write the .heapsnapshot file to. Open it in DevTools -> Memory -> Load profile. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| result | Yes |