Class AsyncStatelessMcpPromptProvider
java.lang.Object
org.springaicommunity.mcp.provider.prompt.AsyncStatelessMcpPromptProvider
Provider for asynchronous 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 and return reactive types.- Author:
- Christian Tzolov
-
Constructor Summary
ConstructorsConstructorDescriptionAsyncStatelessMcpPromptProvider(List<Object> promptObjects) Create a new AsyncStatelessMcpPromptProvider. -
Method Summary
Modifier and TypeMethodDescriptionprotected Method[]doGetClassMethods(Object bean) Returns the methods of the given bean class.List<io.modelcontextprotocol.server.McpStatelessServerFeatures.AsyncPromptSpecification>Get the async stateless prompt specifications.
-
Constructor Details
-
AsyncStatelessMcpPromptProvider
Create a new AsyncStatelessMcpPromptProvider.- Parameters:
promptObjects- the objects containing methods annotated withMcpPrompt
-
-
Method Details
-
getPromptSpecifications
public List<io.modelcontextprotocol.server.McpStatelessServerFeatures.AsyncPromptSpecification> getPromptSpecifications()Get the async stateless prompt specifications.- Returns:
- the list of async stateless prompt specifications
-
doGetClassMethods
Returns the methods of the given bean class.- Parameters:
bean- the bean instance- Returns:
- the methods of the bean class
-