@@ -699,9 +699,11 @@ export class McpResponse implements Response {
699699 } ;
700700 pages ?: object [ ] ;
701701 pagination ?: object ;
702- heapSnapshot ?: object [ ] ;
703- heapSnapshotStats ?: object ;
704- heapSnapshotStaticData ?: object ;
702+ heapSnapshot ?: {
703+ stats ?: object ;
704+ staticData ?: object ;
705+ } ;
706+ heapSnapshotData ?: object [ ] ;
705707 extensionServiceWorkers ?: object [ ] ;
706708 extensionPages ?: object [ ] ;
707709 } = { } ;
@@ -904,11 +906,13 @@ Call ${handleDialog.name} to handle it before continuing.`);
904906 const staticData = this . #heapSnapshotOptions. staticData ;
905907 if ( stats ) {
906908 response . push ( `Statistics: ${ JSON . stringify ( stats , null , 2 ) } ` ) ;
907- structuredContent . heapSnapshotStats = stats ;
909+ structuredContent . heapSnapshot = structuredContent . heapSnapshot || { } ;
910+ structuredContent . heapSnapshot . stats = stats ;
908911 }
909912 if ( staticData ) {
910913 response . push ( `Static Data: ${ JSON . stringify ( staticData , null , 2 ) } ` ) ;
911- structuredContent . heapSnapshotStaticData = staticData ;
914+ structuredContent . heapSnapshot = structuredContent . heapSnapshot || { } ;
915+ structuredContent . heapSnapshot . staticData = staticData ;
912916 }
913917 const aggregates = this . #heapSnapshotOptions. aggregates ;
914918 if ( aggregates ) {
@@ -926,7 +930,7 @@ Call ${handleDialog.name} to handle it before continuing.`);
926930 const formatter = new HeapSnapshotFormatter ( paginatedRecord ) ;
927931
928932 response . push ( formatter . toString ( ) ) ;
929- structuredContent . heapSnapshot = formatter . toJSON ( ) ;
933+ structuredContent . heapSnapshotData = formatter . toJSON ( ) ;
930934 }
931935 }
932936
0 commit comments