public static class McpServerFeatures.AsyncToolSpecification
extends java.lang.Object
| 限定符和类型 | 类和说明 |
|---|---|
static class |
McpServerFeatures.AsyncToolSpecification.Builder
Builder for creating AsyncToolSpecification instances.
|
| 构造器和说明 |
|---|
AsyncToolSpecification(McpSchema.Tool tool,
java.util.function.BiFunction<McpAsyncServerExchange,java.util.Map<java.lang.String,java.lang.Object>,reactor.core.publisher.Mono<McpSchema.CallToolResult>> call)
已过时。
Use
AsyncToolSpecification(McpSchema.Tool, null,
BiFunction) instead. |
AsyncToolSpecification(McpSchema.Tool tool,
java.util.function.BiFunction<McpAsyncServerExchange,java.util.Map<java.lang.String,java.lang.Object>,reactor.core.publisher.Mono<McpSchema.CallToolResult>> call,
java.util.function.BiFunction<McpAsyncServerExchange,McpSchema.CallToolRequest,reactor.core.publisher.Mono<McpSchema.CallToolResult>> callHandler) |
| 限定符和类型 | 方法和说明 |
|---|---|
static McpServerFeatures.AsyncToolSpecification.Builder |
builder()
Creates a new builder instance.
|
java.util.function.BiFunction<McpAsyncServerExchange,java.util.Map<java.lang.String,java.lang.Object>,reactor.core.publisher.Mono<McpSchema.CallToolResult>> |
call() |
java.util.function.BiFunction<McpAsyncServerExchange,McpSchema.CallToolRequest,reactor.core.publisher.Mono<McpSchema.CallToolResult>> |
callHandler() |
McpSchema.Tool |
tool() |
public AsyncToolSpecification(McpSchema.Tool tool, java.util.function.BiFunction<McpAsyncServerExchange,java.util.Map<java.lang.String,java.lang.Object>,reactor.core.publisher.Mono<McpSchema.CallToolResult>> call, java.util.function.BiFunction<McpAsyncServerExchange,McpSchema.CallToolRequest,reactor.core.publisher.Mono<McpSchema.CallToolResult>> callHandler)
tool - The tool definition including name, description, and parameter schemacall - Deprecated. Use the callHandler instead.callHandler - The function that implements the tool's logic, receiving a
McpAsyncServerExchange and a
McpSchema.CallToolRequest and returning
results. The function's first argument is an McpAsyncServerExchange upon
which the server can interact with the connected client. The second arguments is a
map of tool arguments.@Deprecated public AsyncToolSpecification(McpSchema.Tool tool, java.util.function.BiFunction<McpAsyncServerExchange,java.util.Map<java.lang.String,java.lang.Object>,reactor.core.publisher.Mono<McpSchema.CallToolResult>> call)
AsyncToolSpecification(McpSchema.Tool, null,
BiFunction) instead.public McpSchema.Tool tool()
public java.util.function.BiFunction<McpAsyncServerExchange,java.util.Map<java.lang.String,java.lang.Object>,reactor.core.publisher.Mono<McpSchema.CallToolResult>> call()
public java.util.function.BiFunction<McpAsyncServerExchange,McpSchema.CallToolRequest,reactor.core.publisher.Mono<McpSchema.CallToolResult>> callHandler()
public static McpServerFeatures.AsyncToolSpecification.Builder builder()