Skip to content

Commit 06e20ac

Browse files
Fix tool not found in MCP memory issue (#3931) (#3932)
(cherry picked from commit 782e97d) Signed-off-by: zane-neo <[email protected]> Co-authored-by: zane-neo <[email protected]>
1 parent a551c9c commit 06e20ac

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

plugin/src/main/java/org/opensearch/ml/action/mcpserver/TransportMcpToolsRemoveOnNodesAction.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -112,7 +112,7 @@ private MLMcpToolsRemoveNodeResponse removeMcpTools(List<String> tools) {
112112
);
113113
errors.get().add(toolName);
114114
return Mono.empty();
115-
}).subscribe();
115+
}).doOnSuccess(x -> McpAsyncServerHolder.IN_MEMORY_MCP_TOOLS.remove(toolName)).subscribe();
116116
}
117117
return Mono.empty();
118118
}).doOnComplete(() -> log.debug("Successfully removed tools on node: {}", clusterService.localNode().getId())).subscribe();

0 commit comments

Comments
 (0)