public class McpSyncServerExchange extends Object
| Constructor and Description |
|---|
McpSyncServerExchange(McpAsyncServerExchange exchange)
Create a new synchronous exchange with the client using the provided asynchronous
implementation as a delegate.
|
| Modifier and Type | Method and Description |
|---|---|
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.
|
McpServerSession |
getSession() |
McpSchema.ListRootsResult |
listRoots()
Retrieves the list of all roots provided by the client.
|
McpSchema.ListRootsResult |
listRoots(String cursor)
Retrieves a paginated list of roots provided by the client.
|
public McpSyncServerExchange(McpAsyncServerExchange exchange)
exchange - The asynchronous exchange to delegate to.public McpServerSession getSession()
public McpSchema.ClientCapabilities getClientCapabilities()
public McpSchema.Implementation getClientInfo()
public McpSchema.CreateMessageResult createMessage(McpSchema.CreateMessageRequest createMessageRequest)
createMessageRequest - The request to create a new messageMcpSchema.CreateMessageRequest,
McpSchema.CreateMessageResult,
Sampling
Specificationpublic McpSchema.ListRootsResult listRoots()
public McpSchema.ListRootsResult listRoots(String cursor)
cursor - Optional pagination cursor from a previous list requestCopyright © 2025. All rights reserved.