File tree Expand file tree Collapse file tree 2 files changed +5
-1
lines changed Expand file tree Collapse file tree 2 files changed +5
-1
lines changed Original file line number Diff line number Diff line change @@ -32,6 +32,8 @@ export const LogId = {
32
32
33
33
mongodbConnectFailure : mongoLogId ( 1_004_001 ) ,
34
34
mongodbDisconnectFailure : mongoLogId ( 1_004_002 ) ,
35
+
36
+ toolUpdateFailure : mongoLogId ( 1_005_001 ) ,
35
37
} as const ;
36
38
37
39
abstract class LoggerBase {
Original file line number Diff line number Diff line change @@ -93,10 +93,12 @@ export abstract class ToolBase {
93
93
this . update = ( updates : { name ?: string ; description ?: string ; inputSchema ?: AnyZodObject } ) => {
94
94
const tools = server [ "_registeredTools" ] as { [ toolName : string ] : RegisteredTool } ;
95
95
const existingTool = tools [ this . name ] ;
96
+
96
97
if ( ! existingTool ) {
97
- // Optionally, throw or log an error here
98
+ logger . warning ( LogId . toolUpdateFailure , "tool" , `Tool ${ this . name } not found in update` ) ;
98
99
return ;
99
100
}
101
+
100
102
existingTool . annotations = this . annotations ;
101
103
102
104
if ( updates . name && updates . name !== this . name ) {
You can’t perform that action at this time.
0 commit comments