File tree Expand file tree Collapse file tree 2 files changed +5
-5
lines changed Expand file tree Collapse file tree 2 files changed +5
-5
lines changed Original file line number Diff line number Diff line change @@ -75,11 +75,11 @@ export abstract class MongoDBToolBase extends ToolBase {
7575 return this . session . connectToMongoDB ( connectionString , this . config . connectOptions ) ;
7676 }
7777
78- protected resolveToolMetadata (
78+ protected resolveTelemetryMetadata (
7979 args : ToolArgs < typeof this . argsShape > ,
8080 extra : RequestHandlerExtra < ServerRequest , ServerNotification >
8181 ) : ToolMetadata {
82- const metadata = super . resolveToolMetadata ( args , extra ) ;
82+ const metadata = super . resolveTelemetryMetadata ( args , extra ) ;
8383
8484 // Add projectId to the metadata if running a MongoDB operation to an Atlas cluster
8585 if ( this . session . connectedAtlasCluster ?. projectId ) {
Original file line number Diff line number Diff line change @@ -139,10 +139,10 @@ export abstract class ToolBase {
139139 * @param args - The arguments passed to the tool
140140 * @returns The tool metadata
141141 */
142- protected resolveToolMetadata ( ...args : Parameters < ToolCallback < typeof this . argsShape > > ) : ToolMetadata {
142+ protected resolveTelemetryMetadata ( ...args : Parameters < ToolCallback < typeof this . argsShape > > ) : ToolMetadata {
143143 const toolMetadata : ToolMetadata = { } ;
144144 try {
145- if ( ! args [ 0 ] || typeof args [ 0 ] !== "object" ) {
145+ if ( ! args . length ) {
146146 return toolMetadata ;
147147 }
148148
@@ -192,7 +192,7 @@ export abstract class ToolBase {
192192 return ;
193193 }
194194 const duration = Date . now ( ) - startTime ;
195- const metadata = this . resolveToolMetadata ( ...args ) ;
195+ const metadata = this . resolveTelemetryMetadata ( ...args ) ;
196196 const event : ToolEvent = {
197197 timestamp : new Date ( ) . toISOString ( ) ,
198198 source : "mdbmcp" ,
You can’t perform that action at this time.
0 commit comments