[mcp] Don't log a 'Roots list changed notification' warning message (#21079)

Signed-off-by: Rob Nielsen <rob.nielsen@yahoo.com>
This commit is contained in:
robnielsen
2026-07-09 23:10:22 +02:00
committed by GitHub
parent 2e31780c22
commit a80297dc2d
@@ -329,6 +329,7 @@ public class McpService {
.jsonSchemaValidator(new DefaultJsonSchemaValidator()).serverInfo(SERVER_NAME, SERVER_VERSION) .jsonSchemaValidator(new DefaultJsonSchemaValidator()).serverInfo(SERVER_NAME, SERVER_VERSION)
.capabilities(capabilities).resources(resourceProvider.resources()) .capabilities(capabilities).resources(resourceProvider.resources())
.resourceTemplates(resourceProvider.templates()).instructions(buildInstructions()) .resourceTemplates(resourceProvider.templates()).instructions(buildInstructions())
.rootsChangeHandlers(List.of((exchange, roots) -> logger.debug("Roots list changed: {}", roots)))
.toolCall(semanticTools.getSemanticModelTool(), .toolCall(semanticTools.getSemanticModelTool(),
(exchange, req) -> semanticTools.handleGetSemanticModel(req)) (exchange, req) -> semanticTools.handleGetSemanticModel(req))
.toolCall(itemTools.getSearchItemsTool(), (exchange, req) -> itemTools.handleSearchItems(req)) .toolCall(itemTools.getSearchItemsTool(), (exchange, req) -> itemTools.handleSearchItems(req))