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