Class AsyncStatelessMcpToolProvider
java.lang.Object
org.springaicommunity.mcp.provider.tool.AbstractMcpToolProvider
org.springaicommunity.mcp.provider.tool.AsyncStatelessMcpToolProvider
Provider for asynchronous stateless MCP tool methods.
This provider creates tool specifications for methods annotated with
McpTool
that are designed to work in a stateless manner using McpTransportContext and
return reactive types.- Author:
- Christian Tzolov
-
Field Summary
Fields inherited from class org.springaicommunity.mcp.provider.tool.AbstractMcpToolProvider
jsonMapper, toolObjects -
Constructor Summary
ConstructorsConstructorDescriptionAsyncStatelessMcpToolProvider(List<Object> toolObjects) Create a new AsyncStatelessMcpToolProvider. -
Method Summary
Modifier and TypeMethodDescriptionList<io.modelcontextprotocol.server.McpStatelessServerFeatures.AsyncToolSpecification>Get the async stateless tool specifications.Methods inherited from class org.springaicommunity.mcp.provider.tool.AbstractMcpToolProvider
doGetClassMethods, doGetMcpToolAnnotation, doGetToolCallException, getJsonMapper, setJsonMapper
-
Constructor Details
-
AsyncStatelessMcpToolProvider
Create a new AsyncStatelessMcpToolProvider.- Parameters:
toolObjects- the objects containing methods annotated withMcpTool
-
-
Method Details
-
getToolSpecifications
public List<io.modelcontextprotocol.server.McpStatelessServerFeatures.AsyncToolSpecification> getToolSpecifications()Get the async stateless tool specifications.- Returns:
- the list of async stateless tool specifications
-