public class McpStatelessAsyncServer extends Object
| Modifier and Type | Method and Description |
|---|---|
reactor.core.publisher.Mono<Void> |
addPrompt(McpStatelessServerFeatures.AsyncPromptSpecification promptSpecification)
Add a new prompt handler at runtime.
|
reactor.core.publisher.Mono<Void> |
addResource(McpStatelessServerFeatures.AsyncResourceSpecification resourceSpecification)
Add a new resource handler at runtime.
|
reactor.core.publisher.Mono<Void> |
addTool(McpStatelessServerFeatures.AsyncToolSpecification toolSpecification)
Add a new tool specification at runtime.
|
void |
close()
Close the server immediately.
|
reactor.core.publisher.Mono<Void> |
closeGracefully()
Gracefully closes the server, allowing any in-progress operations to complete.
|
McpSchema.ServerCapabilities |
getServerCapabilities()
Get the server capabilities that define the supported features and functionality.
|
McpSchema.Implementation |
getServerInfo()
Get the server implementation information.
|
reactor.core.publisher.Mono<Void> |
removePrompt(String promptName)
Remove a prompt handler at runtime.
|
reactor.core.publisher.Mono<Void> |
removeResource(String resourceUri)
Remove a resource handler at runtime.
|
reactor.core.publisher.Mono<Void> |
removeTool(String toolName)
Remove a tool handler at runtime.
|
public McpSchema.ServerCapabilities getServerCapabilities()
public McpSchema.Implementation getServerInfo()
public reactor.core.publisher.Mono<Void> closeGracefully()
public void close()
public reactor.core.publisher.Mono<Void> addTool(McpStatelessServerFeatures.AsyncToolSpecification toolSpecification)
toolSpecification - The tool specification to addpublic reactor.core.publisher.Mono<Void> removeTool(String toolName)
toolName - The name of the tool handler to removepublic reactor.core.publisher.Mono<Void> addResource(McpStatelessServerFeatures.AsyncResourceSpecification resourceSpecification)
resourceSpecification - The resource handler to addpublic reactor.core.publisher.Mono<Void> removeResource(String resourceUri)
resourceUri - The URI of the resource handler to removepublic reactor.core.publisher.Mono<Void> addPrompt(McpStatelessServerFeatures.AsyncPromptSpecification promptSpecification)
promptSpecification - The prompt handler to addCopyright © 2025. All rights reserved.