Class SyncStatelessMcpPromptProvider
java.lang.Object
org.springaicommunity.mcp.provider.prompt.SyncStatelessMcpPromptProvider
Provider for synchronous stateless MCP prompt methods.
This provider creates prompt specifications for methods annotated with
McpPrompt that are designed to work in a stateless manner using
McpTransportContext.- Author:
- Christian Tzolov
-
Constructor Summary
ConstructorsConstructorDescriptionSyncStatelessMcpPromptProvider(List<Object> promptObjects) Create a new SyncStatelessMcpPromptProvider. -
Method Summary
Modifier and TypeMethodDescriptionprotected Method[]doGetClassMethods(Object bean) Returns the methods of the given bean class.List<io.modelcontextprotocol.server.McpStatelessServerFeatures.SyncPromptSpecification>Get the stateless prompt specifications.
-
Constructor Details
-
SyncStatelessMcpPromptProvider
Create a new SyncStatelessMcpPromptProvider.- Parameters:
promptObjects- the objects containing methods annotated withMcpPrompt
-
-
Method Details
-
getPromptSpecifications
public List<io.modelcontextprotocol.server.McpStatelessServerFeatures.SyncPromptSpecification> getPromptSpecifications()Get the stateless prompt specifications.- Returns:
- the list of stateless prompt specifications
-
doGetClassMethods
Returns the methods of the given bean class.- Parameters:
bean- the bean instance- Returns:
- the methods of the bean class
-