public class McpStatelessSyncServer
extends java.lang.Object
限定符和类型 | 方法和说明 |
---|---|
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<java.lang.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(java.lang.String promptName)
Remove a prompt handler at runtime.
|
void |
removeResource(java.lang.String resourceUri)
Remove a resource handler at runtime.
|
void |
removeTool(java.lang.String toolName)
Remove a tool handler at runtime.
|
public McpSchema.ServerCapabilities getServerCapabilities()
public McpSchema.Implementation getServerInfo()
public reactor.core.publisher.Mono<java.lang.Void> closeGracefully()
public void close()
public void addTool(McpStatelessServerFeatures.SyncToolSpecification toolSpecification)
toolSpecification
- The tool specification to addpublic void removeTool(java.lang.String toolName)
toolName
- The name of the tool handler to removepublic void addResource(McpStatelessServerFeatures.SyncResourceSpecification resourceSpecification)
resourceSpecification
- The resource handler to addpublic void removeResource(java.lang.String resourceUri)
resourceUri
- The URI of the resource handler to removepublic void addPrompt(McpStatelessServerFeatures.SyncPromptSpecification promptSpecification)
promptSpecification
- The prompt handler to addpublic void removePrompt(java.lang.String promptName)
promptName
- The name of the prompt handler to remove