Interface McpServerAddToolAction

All Superinterfaces:
McpServerUpdateAction

public interface McpServerAddToolAction extends McpServerUpdateAction

Adds a single tool to the MCP Server's list of enabled tools. Has no effect if the tool is already present.


Example to create an instance using the builder pattern

     McpServerAddToolAction mcpServerAddToolAction = McpServerAddToolAction.builder()
             .tool(McpServerTool.ALL)
             .build()
 
  • Field Details

  • Method Details

    • getTool

      @NotNull @NotNull McpServerTool getTool()

      Name of the tool to add, such as read_products or create_orders.

      Returns:
      tool
    • setTool

      void setTool(McpServerTool tool)

      Name of the tool to add, such as read_products or create_orders.

      Parameters:
      tool - value to be set
    • of

      factory method
      Returns:
      instance of McpServerAddToolAction
    • of

      factory method to create a shallow copy McpServerAddToolAction
      Parameters:
      template - instance to be copied
      Returns:
      copy instance
    • copyDeep

      Specified by:
      copyDeep in interface McpServerUpdateAction
    • deepCopy

      @Nullable static McpServerAddToolAction deepCopy(@Nullable McpServerAddToolAction template)
      factory method to create a deep copy of McpServerAddToolAction
      Parameters:
      template - instance to be copied
      Returns:
      copy instance
    • builder

      builder factory method for McpServerAddToolAction
      Returns:
      builder
    • builder

      create builder for McpServerAddToolAction instance
      Parameters:
      template - instance with prefilled values for the builder
      Returns:
      builder
    • withMcpServerAddToolAction

      default <T> T withMcpServerAddToolAction(Function<McpServerAddToolAction,T> helper)
      accessor map function
      Type Parameters:
      T - mapped type
      Parameters:
      helper - function to map the object
      Returns:
      mapped value
    • typeReference

      static tools.jackson.core.type.TypeReference<McpServerAddToolAction> typeReference()
      gives a TypeReference for usage with Jackson DataBind
      Returns:
      TypeReference