public class McpAsyncServerExchange extends Object
| Constructor and Description |
|---|
McpAsyncServerExchange(McpServerSession session,
McpSchema.ClientCapabilities clientCapabilities,
McpSchema.Implementation clientInfo)
Create a new asynchronous exchange with the client.
|
| Modifier and Type | Method and Description |
|---|---|
reactor.core.publisher.Mono<McpSchema.CreateMessageResult> |
createMessage(McpSchema.CreateMessageRequest createMessageRequest)
Create a new message using the sampling capabilities of the client.
|
McpSchema.ClientCapabilities |
getClientCapabilities()
Get the client capabilities that define the supported features and functionality.
|
McpSchema.Implementation |
getClientInfo()
Get the client implementation information.
|
reactor.core.publisher.Mono<McpSchema.ListRootsResult> |
listRoots()
Retrieves the list of all roots provided by the client.
|
reactor.core.publisher.Mono<McpSchema.ListRootsResult> |
listRoots(String cursor)
Retrieves a paginated list of roots provided by the client.
|
public McpAsyncServerExchange(McpServerSession session, McpSchema.ClientCapabilities clientCapabilities, McpSchema.Implementation clientInfo)
session - The server session representing a 1-1 interaction.clientCapabilities - The client capabilities that define the supported
features and functionality.clientInfo - The client implementation information.public McpSchema.ClientCapabilities getClientCapabilities()
public McpSchema.Implementation getClientInfo()
public reactor.core.publisher.Mono<McpSchema.CreateMessageResult> createMessage(McpSchema.CreateMessageRequest createMessageRequest)
createMessageRequest - The request to create a new messageMcpSchema.CreateMessageRequest,
McpSchema.CreateMessageResult,
Sampling
Specificationpublic reactor.core.publisher.Mono<McpSchema.ListRootsResult> listRoots()
public reactor.core.publisher.Mono<McpSchema.ListRootsResult> listRoots(String cursor)
cursor - Optional pagination cursor from a previous list requestCopyright © 2025. All rights reserved.