Interface CommerceMcpServerConfig

All Superinterfaces:
McpServerConfig

public interface CommerceMcpServerConfig extends McpServerConfig

Connection configuration of a Commerce MCP Server. Exposes the Commerce MCP Server tools to AI agents.


Example to create an instance using the builder pattern

     CommerceMcpServerConfig commerceMcpServerConfig = CommerceMcpServerConfig.builder()
             .majorVersion("{majorVersion}")
             .url("{url}")
             .plusTools(toolsBuilder -> toolsBuilder)
             .plusToolCustomizations(toolCustomizationsBuilder -> toolCustomizationsBuilder)
             .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
    • getUrl

      @NotNull @NotNull String getUrl()

      URL of the MCP Server. Generated by the system from the region, domain, Project key, and MCP Server key. Format: https://mcp.{region}.{domain}/projects/{projectKey}/{mcpServerKey}

      Returns:
      url
    • getTools

      @NotNull @NotNull List<McpServerTool> getTools()

      List of tools enabled 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

      @NotNull @Valid @NotNull @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
    • setUrl

      void setUrl(String url)

      URL of the MCP Server. Generated by the system from the region, domain, Project key, and MCP Server key. Format: https://mcp.{region}.{domain}/projects/{projectKey}/{mcpServerKey}

      Parameters:
      url - value to be set
    • setTools

      void setTools(McpServerTool... tools)

      List of tools enabled 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 enabled 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 CommerceMcpServerConfig
    • of

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

      Specified by:
      copyDeep in interface McpServerConfig
    • deepCopy

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

      builder factory method for CommerceMcpServerConfig
      Returns:
      builder
    • builder

      create builder for CommerceMcpServerConfig instance
      Parameters:
      template - instance with prefilled values for the builder
      Returns:
      builder
    • withCommerceMcpServerConfig

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