Interface ToolCustomization
Customization applied to a single tool at tools/list and tools/call time. At least one of description or a non-empty parameters list must be present; a customization with neither has no effect and is rejected. Parameter names within parameters must be unique.
Example to create an instance using the builder pattern
ToolCustomization toolCustomization = ToolCustomization.builder()
.tool(McpServerTool.ALL)
.build()
-
Method Summary
Modifier and TypeMethodDescriptionstatic ToolCustomizationBuilderbuilder()builder factory method for ToolCustomizationstatic ToolCustomizationBuilderbuilder(ToolCustomization template) create builder for ToolCustomization instancecopyDeep()static ToolCustomizationdeepCopy(ToolCustomization template) factory method to create a deep copy of ToolCustomizationReplacement description for the tool, shown to the AI agent.@Valid List<ParameterOverride>Overrides applied to individual parameters of the tool's input schema.@NotNull McpServerToolgetTool()Name of the tool to customize, such asread_productsorcreate_orders.static ToolCustomizationof()factory methodstatic ToolCustomizationof(ToolCustomization template) factory method to create a shallow copy ToolCustomizationvoidsetDescription(String description) Replacement description for the tool, shown to the AI agent.voidsetParameters(ParameterOverride... parameters) Overrides applied to individual parameters of the tool's input schema.voidsetParameters(List<ParameterOverride> parameters) Overrides applied to individual parameters of the tool's input schema.voidsetTool(McpServerTool tool) Name of the tool to customize, such asread_productsorcreate_orders.static tools.jackson.core.type.TypeReference<ToolCustomization>gives a TypeReference for usage with Jackson DataBinddefault <T> TwithToolCustomization(Function<ToolCustomization, T> helper) accessor map function
-
Method Details
-
getTool
Name of the tool to customize, such as
read_productsorcreate_orders. Must be one of the tools enabled on the MCP Server.- Returns:
- tool
-
getDescription
String getDescription()Replacement description for the tool, shown to the AI agent.
- Returns:
- description
-
getParameters
Overrides applied to individual parameters of the tool's input schema.
- Returns:
- parameters
-
setTool
Name of the tool to customize, such as
read_productsorcreate_orders. Must be one of the tools enabled on the MCP Server.- Parameters:
tool- value to be set
-
setDescription
Replacement description for the tool, shown to the AI agent.
- Parameters:
description- value to be set
-
setParameters
Overrides applied to individual parameters of the tool's input schema.
- Parameters:
parameters- values to be set
-
setParameters
Overrides applied to individual parameters of the tool's input schema.
- Parameters:
parameters- values to be set
-
of
factory method- Returns:
- instance of ToolCustomization
-
of
factory method to create a shallow copy ToolCustomization- Parameters:
template- instance to be copied- Returns:
- copy instance
-
copyDeep
ToolCustomization copyDeep() -
deepCopy
factory method to create a deep copy of ToolCustomization- Parameters:
template- instance to be copied- Returns:
- copy instance
-
builder
builder factory method for ToolCustomization- Returns:
- builder
-
builder
create builder for ToolCustomization instance- Parameters:
template- instance with prefilled values for the builder- Returns:
- builder
-
withToolCustomization
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
-