Interface CommerceMcpServerConfig
- All Superinterfaces:
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 Summary
FieldsModifier and TypeFieldDescriptionstatic final Stringdiscriminator value for CommerceMcpServerConfig -
Method Summary
Modifier and TypeMethodDescriptionbuilder()builder factory method for CommerceMcpServerConfigbuilder(CommerceMcpServerConfig template) create builder for CommerceMcpServerConfig instancecopyDeep()static CommerceMcpServerConfigdeepCopy(CommerceMcpServerConfig template) factory method to create a deep copy of CommerceMcpServerConfig@Valid McpServerJsonOutputFilteringResponse field-filtering rules applied to tool responses.@NotNull StringMajor version of this MCP Server type.@NotNull @Valid List<ToolCustomization>Per-tool customizations applied attools/listandtools/calltime, such as overriding a tool's description or constraining its parameters.Output formatting applied to tool responses.@NotNull List<McpServerTool>getTools()List of tools enabled for this MCP Server.@NotNull StringgetUrl()URL of the MCP Server.static CommerceMcpServerConfigof()factory methodstatic CommerceMcpServerConfigof(CommerceMcpServerConfig template) factory method to create a shallow copy CommerceMcpServerConfigvoidsetJsonOutputFiltering(McpServerJsonOutputFiltering jsonOutputFiltering) Response field-filtering rules applied to tool responses.voidsetMajorVersion(String majorVersion) Major version of this MCP Server type.voidsetToolCustomizations(ToolCustomization... toolCustomizations) Per-tool customizations applied attools/listandtools/calltime, such as overriding a tool's description or constraining its parameters.voidsetToolCustomizations(List<ToolCustomization> toolCustomizations) Per-tool customizations applied attools/listandtools/calltime, such as overriding a tool's description or constraining its parameters.voidsetToolOutputFormatting(McpServerToolOutputFormatting toolOutputFormatting) Output formatting applied to tool responses.voidsetTools(McpServerTool... tools) List of tools enabled for this MCP Server.voidsetTools(List<McpServerTool> tools) List of tools enabled for this MCP Server.voidURL of the MCP Server.static tools.jackson.core.type.TypeReference<CommerceMcpServerConfig>gives a TypeReference for usage with Jackson DataBinddefault <T> Taccessor map functionMethods inherited from interface com.commercetools.api.models.mcp_server.McpServerConfig
getType, withMcpServerConfig
-
Field Details
-
COMMERCE_MCP
discriminator value for CommerceMcpServerConfig- See Also:
-
-
Method Details
-
getMajorVersion
Major version of this MCP Server type. Supported versions are
v1(deprecated) andv4.- Returns:
- majorVersion
-
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
List of tools enabled for this MCP Server. Use
allto enable all available tools, or specify individual tool names such asread_productsorcreate_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
Per-tool customizations applied at
tools/listandtools/calltime, such as overriding a tool's description or constraining its parameters.- Returns:
- toolCustomizations
-
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
Major version of this MCP Server type. Supported versions are
v1(deprecated) andv4.- Parameters:
majorVersion- value to be set
-
setUrl
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
List of tools enabled for this MCP Server. Use
allto enable all available tools, or specify individual tool names such asread_productsorcreate_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
List of tools enabled for this MCP Server. Use
allto enable all available tools, or specify individual tool names such asread_productsorcreate_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
Per-tool customizations applied at
tools/listandtools/calltime, such as overriding a tool's description or constraining its parameters.- Parameters:
toolCustomizations- values to be set
-
setToolCustomizations
Per-tool customizations applied at
tools/listandtools/calltime, such as overriding a tool's description or constraining its parameters.- Parameters:
toolCustomizations- values to be set
-
setJsonOutputFiltering
Response field-filtering rules applied to tool responses.
- Parameters:
jsonOutputFiltering- value to be set
-
setToolOutputFormatting
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
CommerceMcpServerConfig copyDeep()- Specified by:
copyDeepin interfaceMcpServerConfig
-
deepCopy
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
accessor map function- Type Parameters:
T- mapped type- Parameters:
helper- function to map the object- Returns:
- mapped value
-
typeReference
gives a TypeReference for usage with Jackson DataBind- Returns:
- TypeReference
-