11import  {  z  }  from  "zod" ; 
22import  {  AtlasToolBase  }  from  "../atlasTool.js" ; 
3- import  type  {  CallToolResult  }  from  "@modelcontextprotocol/sdk/types.js" ; 
4- import  type  {  OperationType ,  ToolArgs  }  from  "../../tool.js" ; 
3+ import  type  {  CallToolResult ,   ServerNotification ,   ServerRequest  }  from  "@modelcontextprotocol/sdk/types.js" ; 
4+ import  type  {  OperationType ,  TelemetryToolMetadata ,   ToolArgs  }  from  "../../tool.js" ; 
55import  {  formatUntrustedData  }  from  "../../tool.js" ; 
66import  { 
77    getSuggestedIndexes , 
@@ -13,6 +13,7 @@ import {
1313    SLOW_QUERY_LOGS_COPY , 
1414}  from  "../../../common/atlas/performanceAdvisorUtils.js" ; 
1515import  {  AtlasArgs  }  from  "../../args.js" ; 
16+ import  type  {  RequestHandlerExtra  }  from  "@modelcontextprotocol/sdk/shared/protocol.js" ; 
1617
1718const  PerformanceAdvisorOperationType  =  z . enum ( [ 
1819    "suggestedIndexes" , 
@@ -130,4 +131,14 @@ export class GetPerformanceAdvisorTool extends AtlasToolBase {
130131            } ; 
131132        } 
132133    } 
134+ 
135+     protected  override  resolveTelemetryMetadata ( 
136+         result : CallToolResult , 
137+         args : ToolArgs < typeof  this . argsShape > , 
138+         extra : RequestHandlerExtra < ServerRequest ,  ServerNotification > 
139+     ) : TelemetryToolMetadata  { 
140+         const  baseMetadata  =  super . resolveTelemetryMetadata ( result ,  args ,  extra ) ; 
141+         baseMetadata . operations  =  args . operations ; 
142+         return  baseMetadata ; 
143+     } 
133144} 
0 commit comments