11import { z } from "zod" ;
22import { AtlasToolBase } from "../atlasTool.js" ;
33import type { CallToolResult , ServerNotification , ServerRequest } from "@modelcontextprotocol/sdk/types.js" ;
4- import type { OperationType , TelemetryToolMetadata , ToolArgs } from "../../tool.js" ;
4+ import type { OperationType , ToolArgs } from "../../tool.js" ;
55import { formatUntrustedData } from "../../tool.js" ;
66import {
77 getSuggestedIndexes ,
@@ -14,6 +14,7 @@ import {
1414} from "../../../common/atlas/performanceAdvisorUtils.js" ;
1515import { AtlasArgs } from "../../args.js" ;
1616import type { RequestHandlerExtra } from "@modelcontextprotocol/sdk/shared/protocol.js" ;
17+ import type { PerfAdvisorToolMetadata } from "../../../telemetry/types.js" ;
1718
1819const PerformanceAdvisorOperationType = z . enum ( [
1920 "suggestedIndexes" ,
@@ -136,9 +137,10 @@ export class GetPerformanceAdvisorTool extends AtlasToolBase {
136137 result : CallToolResult ,
137138 args : ToolArgs < typeof this . argsShape > ,
138139 extra : RequestHandlerExtra < ServerRequest , ServerNotification >
139- ) : TelemetryToolMetadata {
140- const baseMetadata = super . resolveTelemetryMetadata ( result , args , extra ) ;
141- baseMetadata . operations = args . operations ;
142- return baseMetadata ;
140+ ) : PerfAdvisorToolMetadata {
141+ return {
142+ ...super . resolveTelemetryMetadata ( result , args , extra ) ,
143+ operations : args . operations ,
144+ } ;
143145 }
144146}
0 commit comments