Class SpringAiMcpToolFactory

    • Nested Class Summary

      Nested Classes 
      Modifier and Type Class Description
    • Field Summary

      Fields 
      Modifier and Type Field Description
    • Enum Constant Summary

      Enum Constants 
      Enum Constant Description
    • Method Summary

      Modifier and Type Method Description
      UnfoldingTool unfolding(String name, String description, Function1<ToolCallback, Boolean> filter, Boolean removeOnInvoke) Create an UnfoldingTool from MCP clients with a filter predicate.
      Tool toolByName(String toolName) Get a single MCP tool by exact name.
      Tool requiredToolByName(String toolName) Get a single MCP tool by exact name, throwing if not found.
      • Methods inherited from class com.embabel.agent.tools.mcp.McpToolFactory

        matryoshka, matryoshka, matryoshkaByName, matryoshkaByName, matryoshkaMatching, matryoshkaMatching, unfolding, unfoldingByName, unfoldingByName, unfoldingMatching, unfoldingMatching
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • SpringAiMcpToolFactory

        SpringAiMcpToolFactory(List<McpSyncClient> clients)
    • Method Detail

      • unfolding

         UnfoldingTool unfolding(String name, String description, Function1<ToolCallback, Boolean> filter, Boolean removeOnInvoke)

        Create an UnfoldingTool from MCP clients with a filter predicate.

        Parameters:
        name - Name of the UnfoldingTool facade
        description - Description explaining when to use this tool category
        filter - Predicate that returns true to include a tool
        removeOnInvoke - Whether to remove the facade after invocation
      • toolByName

         Tool toolByName(String toolName)

        Get a single MCP tool by exact name.

        Parameters:
        toolName - The exact name of the MCP tool
        Returns:

        The tool, or null if not found

      • requiredToolByName

         Tool requiredToolByName(String toolName)

        Get a single MCP tool by exact name, throwing if not found.

        Parameters:
        toolName - The exact name of the MCP tool
        Returns:

        The tool