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 = {
3232
3333 mongodbConnectFailure : mongoLogId ( 1_004_001 ) ,
3434 mongodbDisconnectFailure : mongoLogId ( 1_004_002 ) ,
35+
36+ toolUpdateFailure : mongoLogId ( 1_005_001 ) ,
3537} as const ;
3638
3739abstract class LoggerBase {
Original file line number Diff line number Diff line change @@ -93,10 +93,12 @@ export abstract class ToolBase {
9393 this . update = ( updates : { name ?: string ; description ?: string ; inputSchema ?: AnyZodObject } ) => {
9494 const tools = server [ "_registeredTools" ] as { [ toolName : string ] : RegisteredTool } ;
9595 const existingTool = tools [ this . name ] ;
96+
9697 if ( ! existingTool ) {
97- // Optionally, throw or log an error here
98+ logger . warning ( LogId . toolUpdateFailure , "tool" , `Tool ${ this . name } not found in update` ) ;
9899 return ;
99100 }
101+
100102 existingTool . annotations = this . annotations ;
101103
102104 if ( updates . name && updates . name !== this . name ) {
You can’t perform that action at this time.
0 commit comments