Class McpAsyncToolsChangeEventEmmiter

java.lang.Object
org.springframework.ai.mcp.client.common.autoconfigure.McpAsyncToolsChangeEventEmmiter
All Implemented Interfaces:
McpAsyncClientCustomizer

public class McpAsyncToolsChangeEventEmmiter extends Object implements McpAsyncClientCustomizer
Emits McpToolsChangedEvent when the MCP Tools have changed for a given MCP connection.
Author:
Christian Tzolov
  • Constructor Details

    • McpAsyncToolsChangeEventEmmiter

      public McpAsyncToolsChangeEventEmmiter(org.springframework.context.ApplicationEventPublisher applicationEventPublisher)
  • Method Details

    • customize

      public void customize(String connectionName, io.modelcontextprotocol.client.McpClient.AsyncSpec spec)
      Description copied from interface: McpAsyncClientCustomizer
      Customizes an asynchronous MCP client configuration.

      This method is called for each async MCP client being created, allowing for client-specific customizations based on the client's name and specification.

      Specified by:
      customize in interface McpAsyncClientCustomizer
      Parameters:
      connectionName - the name of the MCP client being customized
      spec - the async specification to customize