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 {
75
75
return this . session . connectToMongoDB ( connectionString , this . config . connectOptions ) ;
76
76
}
77
77
78
- protected resolveToolMetadata (
78
+ protected resolveTelemetryMetadata (
79
79
args : ToolArgs < typeof this . argsShape > ,
80
80
extra : RequestHandlerExtra < ServerRequest , ServerNotification >
81
81
) : ToolMetadata {
82
- const metadata = super . resolveToolMetadata ( args , extra ) ;
82
+ const metadata = super . resolveTelemetryMetadata ( args , extra ) ;
83
83
84
84
// Add projectId to the metadata if running a MongoDB operation to an Atlas cluster
85
85
if ( this . session . connectedAtlasCluster ?. projectId ) {
Original file line number Diff line number Diff line change @@ -139,10 +139,10 @@ export abstract class ToolBase {
139
139
* @param args - The arguments passed to the tool
140
140
* @returns The tool metadata
141
141
*/
142
- protected resolveToolMetadata ( ...args : Parameters < ToolCallback < typeof this . argsShape > > ) : ToolMetadata {
142
+ protected resolveTelemetryMetadata ( ...args : Parameters < ToolCallback < typeof this . argsShape > > ) : ToolMetadata {
143
143
const toolMetadata : ToolMetadata = { } ;
144
144
try {
145
- if ( ! args [ 0 ] || typeof args [ 0 ] !== "object" ) {
145
+ if ( ! args . length ) {
146
146
return toolMetadata ;
147
147
}
148
148
@@ -192,7 +192,7 @@ export abstract class ToolBase {
192
192
return ;
193
193
}
194
194
const duration = Date . now ( ) - startTime ;
195
- const metadata = this . resolveToolMetadata ( ...args ) ;
195
+ const metadata = this . resolveTelemetryMetadata ( ...args ) ;
196
196
const event : ToolEvent = {
197
197
timestamp : new Date ( ) . toISOString ( ) ,
198
198
source : "mdbmcp" ,
You can’t perform that action at this time.
0 commit comments