Class SyncStatelessMcpResourceProvider
java.lang.Object
org.springaicommunity.mcp.provider.resource.SyncStatelessMcpResourceProvider
Provider for synchronous stateless MCP resource methods.
This provider creates resource specifications for methods annotated with
McpResource that are designed to work in a stateless manner using
McpTransportContext.- Author:
- Christian Tzolov
-
Constructor Summary
ConstructorsConstructorDescriptionSyncStatelessMcpResourceProvider(List<Object> resourceObjects) Create a new SyncStatelessMcpResourceProvider. -
Method Summary
Modifier and TypeMethodDescriptionprotected Method[]doGetClassMethods(Object bean) protected McpResourcedoGetMcpResourceAnnotation(Method method) List<io.modelcontextprotocol.server.McpStatelessServerFeatures.SyncResourceSpecification>Get the stateless resource specifications.List<io.modelcontextprotocol.server.McpStatelessServerFeatures.SyncResourceTemplateSpecification>
-
Constructor Details
-
SyncStatelessMcpResourceProvider
Create a new SyncStatelessMcpResourceProvider.- Parameters:
resourceObjects- the objects containing methods annotated withMcpResource
-
-
Method Details
-
getResourceSpecifications
public List<io.modelcontextprotocol.server.McpStatelessServerFeatures.SyncResourceSpecification> getResourceSpecifications()Get the stateless resource specifications.- Returns:
- the list of stateless resource specifications
-
getResourceTemplateSpecifications
public List<io.modelcontextprotocol.server.McpStatelessServerFeatures.SyncResourceTemplateSpecification> getResourceTemplateSpecifications() -
doGetClassMethods
-
doGetMcpResourceAnnotation
-