@@ -62,10 +62,6 @@ func (dtm *DynamicToolManager) EnableToolset(ctx context.Context, name string) e
6262 // when AddTool is called (via the Register method), so we don't need to manually
6363 // send notifications here. This happens because WithToolCapabilities(true) was set
6464 // during server initialization.
65- << << << < HEAD
66-
67- == == == =
68- >> >> >> > 4 df4345 (add a comment on where the dynamic tool capability is triggered )
6965 if toolset .AddFunc != nil {
7066 toolset .AddFunc (dtm .server )
7167 }
@@ -169,26 +165,3 @@ func (dtm *DynamicToolManager) getToolsetInfo(name string) *Toolset {
169165 defer dtm .mu .RUnlock ()
170166 return dtm .toolsets [name ]
171167}
172- << << << < HEAD
173-
174- // sendToolListChangedNotification sends a proper MCP ToolListChangedNotification
175- func (dtm * DynamicToolManager ) sendToolListChangedNotification (ctx context.Context ) {
176- // Create notification parameters as map[string]any
177- params := map [string ]any {
178- "_meta" : map [string ]any {
179- "message" : "Tool list has been updated. New tools are now available." ,
180- },
181- }
182-
183- // Send notification to all connected clients
184- dtm .server .SendNotificationToAllClients ("tools/list_changed" , params )
185-
186- // Also try to send to the current context if available
187- if err := dtm .server .SendNotificationToClient (ctx , "tools/list_changed" , params ); err != nil {
188- slog .Debug ("Failed to send notification to client" , "error" , err )
189- }
190-
191- slog .Info ("Sent tool list changed notification to clients" )
192- }
193- == == == =
194- >> >> >> > 4 df4345 (add a comment on where the dynamic tool capability is triggered )
0 commit comments