public static class McpServerFeatures.Sync
extends java.lang.Object
构造器和说明 |
---|
Sync(McpSchema.Implementation serverInfo,
McpSchema.ServerCapabilities serverCapabilities,
java.util.List<McpServerFeatures.SyncToolSpecification> tools,
java.util.Map<java.lang.String,McpServerFeatures.SyncResourceSpecification> resources,
java.util.List<McpSchema.ResourceTemplate> resourceTemplates,
java.util.Map<java.lang.String,McpServerFeatures.SyncPromptSpecification> prompts,
java.util.Map<McpSchema.CompleteReference,McpServerFeatures.SyncCompletionSpecification> completions,
java.util.List<java.util.function.BiConsumer<McpSyncServerExchange,java.util.List<McpSchema.Root>>> rootsChangeConsumers,
java.lang.String instructions)
Create an instance and validate the arguments.
|
public Sync(McpSchema.Implementation serverInfo, McpSchema.ServerCapabilities serverCapabilities, java.util.List<McpServerFeatures.SyncToolSpecification> tools, java.util.Map<java.lang.String,McpServerFeatures.SyncResourceSpecification> resources, java.util.List<McpSchema.ResourceTemplate> resourceTemplates, java.util.Map<java.lang.String,McpServerFeatures.SyncPromptSpecification> prompts, java.util.Map<McpSchema.CompleteReference,McpServerFeatures.SyncCompletionSpecification> completions, java.util.List<java.util.function.BiConsumer<McpSyncServerExchange,java.util.List<McpSchema.Root>>> rootsChangeConsumers, java.lang.String instructions)
serverInfo
- The server implementation detailsserverCapabilities
- The server capabilitiestools
- The list of tool specificationsresources
- The map of resource specificationsresourceTemplates
- The list of resource templatesprompts
- The map of prompt specificationsrootsChangeConsumers
- The list of consumers that will be notified when
the roots list changesinstructions
- The server instructions text