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 |
addResourceTemplate(McpStatelessServerFeatures.SyncResourceTemplateSpecification resourceTemplateSpecification)
Add a new resource template.
|
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.
|
java.util.List<McpSchema.Prompt> |
listPrompts()
List all registered prompts.
|
java.util.List<McpSchema.Resource> |
listResources()
List all registered resources.
|
java.util.List<McpSchema.ResourceTemplate> |
listResourceTemplates()
List all registered resource templates.
|
java.util.List<McpSchema.Tool> |
listTools()
List all registered tools.
|
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 |
removeResourceTemplate(java.lang.String uriTemplate)
Remove a resource template.
|
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 java.util.List<McpSchema.Tool> listTools()
public 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 java.util.List<McpSchema.Resource> listResources()
public void removeResource(java.lang.String resourceUri)
resourceUri - The URI of the resource handler to removepublic void addResourceTemplate(McpStatelessServerFeatures.SyncResourceTemplateSpecification resourceTemplateSpecification)
resourceTemplateSpecification - The resource template specification to addpublic java.util.List<McpSchema.ResourceTemplate> listResourceTemplates()
public void removeResourceTemplate(java.lang.String uriTemplate)
uriTemplate - The URI template of the resource template to removepublic void addPrompt(McpStatelessServerFeatures.SyncPromptSpecification promptSpecification)
promptSpecification - The prompt handler to addpublic java.util.List<McpSchema.Prompt> listPrompts()
public void removePrompt(java.lang.String promptName)
promptName - The name of the prompt handler to remove