public class McpStatelessSyncServer extends Object
| Modifier and Type | Method and Description |
|---|---|
void |
addPrompt(McpStatelessServerFeatures.SyncPromptSpecification promptSpecification)
Add a new prompt handler at runtime.
|
void |
addResource(McpStatelessServerFeatures.SyncResourceSpecification resourceSpecification)
Add a new resource handler at runtime.
|
void |
addTool(McpStatelessServerFeatures.SyncToolSpecification 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.
|
void |
removePrompt(String promptName)
Remove a prompt handler at runtime.
|
void |
removeResource(String resourceUri)
Remove a resource handler at runtime.
|
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 void addTool(McpStatelessServerFeatures.SyncToolSpecification toolSpecification)
toolSpecification - The tool specification to addpublic void removeTool(String toolName)
toolName - The name of the tool handler to removepublic void addResource(McpStatelessServerFeatures.SyncResourceSpecification resourceSpecification)
resourceSpecification - The resource handler to addpublic void removeResource(String resourceUri)
resourceUri - The URI of the resource handler to removepublic void addPrompt(McpStatelessServerFeatures.SyncPromptSpecification promptSpecification)
promptSpecification - The prompt handler to addpublic void removePrompt(String promptName)
promptName - The name of the prompt handler to removeCopyright © 2025. All rights reserved.