Interface CommerceMcpServerConfigDraft

All Superinterfaces:
Draft<CommerceMcpServerConfigDraft>, McpServerConfigDraft

public interface CommerceMcpServerConfigDraft extends McpServerConfigDraft, Draft<CommerceMcpServerConfigDraft>

Connection configuration for creating or updating a Commerce MCP Server.


Example to create an instance using the builder pattern

     CommerceMcpServerConfigDraft commerceMcpServerConfigDraft = CommerceMcpServerConfigDraft.builder()
             .majorVersion("{majorVersion}")
             .plusTools(toolsBuilder -> toolsBuilder)
             .build()
 
  • Field Details

  • Method Details

    • getMajorVersion

      @NotNull @NotNull String getMajorVersion()

      Major version of this MCP Server type. Supported versions are v1 (deprecated) and v4.

      Returns:
      majorVersion
    • getTools

      @NotNull @NotNull List<McpServerTool> getTools()

      List of tools to enable for this MCP Server. Use all to enable all available tools, or specify individual tool names such as read_products or create_orders. To reduce the number of LLM turns and improve overall performance, it is advisable to expose only the tools that are necessary, or at least minimize the exposure of tools that are unlikely to be used.

      Returns:
      tools
    • getToolCustomizations

      @Valid @Valid List<ToolCustomization> getToolCustomizations()

      Per-tool customizations applied at tools/list and tools/call time, such as overriding a tool's description or constraining its parameters.

      Returns:
      toolCustomizations
    • getJsonOutputFiltering

      @Valid @Valid McpServerJsonOutputFiltering getJsonOutputFiltering()

      Response field-filtering rules applied to tool responses.

      Returns:
      jsonOutputFiltering
    • getToolOutputFormatting

      McpServerToolOutputFormatting getToolOutputFormatting()

      Output formatting applied to tool responses. When absent, responses are left untouched.

      Returns:
      toolOutputFormatting
    • setMajorVersion

      void setMajorVersion(String majorVersion)

      Major version of this MCP Server type. Supported versions are v1 (deprecated) and v4.

      Parameters:
      majorVersion - value to be set
    • setTools

      void setTools(McpServerTool... tools)

      List of tools to enable for this MCP Server. Use all to enable all available tools, or specify individual tool names such as read_products or create_orders. To reduce the number of LLM turns and improve overall performance, it is advisable to expose only the tools that are necessary, or at least minimize the exposure of tools that are unlikely to be used.

      Parameters:
      tools - values to be set
    • setTools

      void setTools(List<McpServerTool> tools)

      List of tools to enable for this MCP Server. Use all to enable all available tools, or specify individual tool names such as read_products or create_orders. To reduce the number of LLM turns and improve overall performance, it is advisable to expose only the tools that are necessary, or at least minimize the exposure of tools that are unlikely to be used.

      Parameters:
      tools - values to be set
    • setToolCustomizations

      void setToolCustomizations(ToolCustomization... toolCustomizations)

      Per-tool customizations applied at tools/list and tools/call time, such as overriding a tool's description or constraining its parameters.

      Parameters:
      toolCustomizations - values to be set
    • setToolCustomizations

      void setToolCustomizations(List<ToolCustomization> toolCustomizations)

      Per-tool customizations applied at tools/list and tools/call time, such as overriding a tool's description or constraining its parameters.

      Parameters:
      toolCustomizations - values to be set
    • setJsonOutputFiltering

      void setJsonOutputFiltering(McpServerJsonOutputFiltering jsonOutputFiltering)

      Response field-filtering rules applied to tool responses.

      Parameters:
      jsonOutputFiltering - value to be set
    • setToolOutputFormatting

      void setToolOutputFormatting(McpServerToolOutputFormatting toolOutputFormatting)

      Output formatting applied to tool responses. When absent, responses are left untouched.

      Parameters:
      toolOutputFormatting - value to be set
    • of

      factory method
      Returns:
      instance of CommerceMcpServerConfigDraft
    • of

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

      Specified by:
      copyDeep in interface McpServerConfigDraft
    • deepCopy

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

      builder factory method for CommerceMcpServerConfigDraft
      Returns:
      builder
    • builder

      create builder for CommerceMcpServerConfigDraft instance
      Parameters:
      template - instance with prefilled values for the builder
      Returns:
      builder
    • withCommerceMcpServerConfigDraft

      default <T> T withCommerceMcpServerConfigDraft(Function<CommerceMcpServerConfigDraft,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<CommerceMcpServerConfigDraft> typeReference()
      gives a TypeReference for usage with Jackson DataBind
      Returns:
      TypeReference