Class AsyncMcpPromptProvider
java.lang.Object
org.springaicommunity.mcp.provider.prompt.AsyncMcpPromptProvider
Provider for asynchronous MCP prompt methods.
This provider creates prompt specifications for methods annotated with
McpPrompt that return reactive types and work with
McpAsyncServerExchange.- Author:
- Christian Tzolov
-
Constructor Summary
ConstructorsConstructorDescriptionAsyncMcpPromptProvider(List<Object> promptObjects) Create a new AsyncMcpPromptProvider. -
Method Summary
Modifier and TypeMethodDescriptionprotected Method[]doGetClassMethods(Object bean) Returns the methods of the given bean class.List<io.modelcontextprotocol.server.McpServerFeatures.AsyncPromptSpecification>Get the async prompt specifications.
-
Constructor Details
-
AsyncMcpPromptProvider
Create a new AsyncMcpPromptProvider.- Parameters:
promptObjects- the objects containing methods annotated withMcpPrompt
-
-
Method Details
-
getPromptSpecifications
public List<io.modelcontextprotocol.server.McpServerFeatures.AsyncPromptSpecification> getPromptSpecifications()Get the async prompt specifications.- Returns:
- the list of async prompt specifications
-
doGetClassMethods
Returns the methods of the given bean class.- Parameters:
bean- the bean instance- Returns:
- the methods of the bean class
-