public static class McpStatelessServerFeatures.SyncToolSpecification.Builder
extends java.lang.Object
构造器和说明 |
---|
Builder() |
限定符和类型 | 方法和说明 |
---|---|
McpStatelessServerFeatures.SyncToolSpecification |
build()
Builds the SyncToolSpecification instance.
|
McpStatelessServerFeatures.SyncToolSpecification.Builder |
callHandler(java.util.function.BiFunction<McpTransportContext,McpSchema.CallToolRequest,McpSchema.CallToolResult> callHandler)
Sets the call tool handler function.
|
McpStatelessServerFeatures.SyncToolSpecification.Builder |
tool(McpSchema.Tool tool)
Sets the tool definition.
|
public McpStatelessServerFeatures.SyncToolSpecification.Builder tool(McpSchema.Tool tool)
tool
- The tool definition including name, description, and parameter
schemapublic McpStatelessServerFeatures.SyncToolSpecification.Builder callHandler(java.util.function.BiFunction<McpTransportContext,McpSchema.CallToolRequest,McpSchema.CallToolResult> callHandler)
callHandler
- The function that implements the tool's logicpublic McpStatelessServerFeatures.SyncToolSpecification build()
java.lang.IllegalArgumentException
- if required fields are not set