Class CommerceMcpServerConfigDraftBuilder

java.lang.Object
com.commercetools.api.models.mcp_server.CommerceMcpServerConfigDraftBuilder
All Implemented Interfaces:
Builder<CommerceMcpServerConfigDraft>

public class CommerceMcpServerConfigDraftBuilder extends Object implements Builder<CommerceMcpServerConfigDraft>
CommerceMcpServerConfigDraftBuilder
Example to create an instance using the builder pattern

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

    • CommerceMcpServerConfigDraftBuilder

      public CommerceMcpServerConfigDraftBuilder()
  • Method Details

    • majorVersion

      public CommerceMcpServerConfigDraftBuilder majorVersion(String majorVersion)

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

      Parameters:
      majorVersion - value to be set
      Returns:
      Builder
    • 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 - value to be set
      Returns:
      Builder
    • 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 - value to be set
      Returns:
      Builder
    • plusTools

      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 - value to be set
      Returns:
      Builder
    • toolCustomizations

      public CommerceMcpServerConfigDraftBuilder toolCustomizations(@Nullable 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 - value to be set
      Returns:
      Builder
    • toolCustomizations

      public CommerceMcpServerConfigDraftBuilder toolCustomizations(@Nullable 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 - value to be set
      Returns:
      Builder
    • plusToolCustomizations

      public CommerceMcpServerConfigDraftBuilder plusToolCustomizations(@Nullable 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 - value to be set
      Returns:
      Builder
    • plusToolCustomizations

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

      Parameters:
      builder - function to build the toolCustomizations value
      Returns:
      Builder
    • withToolCustomizations

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

      Parameters:
      builder - function to build the toolCustomizations value
      Returns:
      Builder
    • addToolCustomizations

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

      Parameters:
      builder - function to build the toolCustomizations value
      Returns:
      Builder
    • setToolCustomizations

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

      Parameters:
      builder - function to build the toolCustomizations value
      Returns:
      Builder
    • jsonOutputFiltering

      Response field-filtering rules applied to tool responses.

      Parameters:
      builder - function to build the jsonOutputFiltering value
      Returns:
      Builder
    • withJsonOutputFiltering

      Response field-filtering rules applied to tool responses.

      Parameters:
      builder - function to build the jsonOutputFiltering value
      Returns:
      Builder
    • jsonOutputFiltering

      public CommerceMcpServerConfigDraftBuilder jsonOutputFiltering(@Nullable McpServerJsonOutputFiltering jsonOutputFiltering)

      Response field-filtering rules applied to tool responses.

      Parameters:
      jsonOutputFiltering - value to be set
      Returns:
      Builder
    • toolOutputFormatting

      public CommerceMcpServerConfigDraftBuilder toolOutputFormatting(@Nullable McpServerToolOutputFormatting toolOutputFormatting)

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

      Parameters:
      toolOutputFormatting - value to be set
      Returns:
      Builder
    • getMajorVersion

      public String getMajorVersion()

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

      Returns:
      majorVersion
    • getTools

      public 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

      @Nullable public 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

      @Nullable public McpServerJsonOutputFiltering getJsonOutputFiltering()

      Response field-filtering rules applied to tool responses.

      Returns:
      jsonOutputFiltering
    • getToolOutputFormatting

      @Nullable public McpServerToolOutputFormatting getToolOutputFormatting()

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

      Returns:
      toolOutputFormatting
    • build

      builds CommerceMcpServerConfigDraft with checking for non-null required values
      Specified by:
      build in interface Builder<CommerceMcpServerConfigDraft>
      Returns:
      CommerceMcpServerConfigDraft
    • buildUnchecked

      public CommerceMcpServerConfigDraft buildUnchecked()
      builds CommerceMcpServerConfigDraft without checking for non-null required values
      Returns:
      CommerceMcpServerConfigDraft
    • of

      factory method for an instance of CommerceMcpServerConfigDraftBuilder
      Returns:
      builder
    • of

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