Class SyncStatelessMcpToolProvider
java.lang.Object
org.springaicommunity.mcp.provider.tool.AbstractMcpToolProvider
org.springaicommunity.mcp.provider.tool.SyncStatelessMcpToolProvider
Provider for synchronous 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.- Author:
- Christian Tzolov
-
Field Summary
Fields inherited from class org.springaicommunity.mcp.provider.tool.AbstractMcpToolProvider
jsonMapper, toolObjects -
Constructor Summary
ConstructorsConstructorDescriptionSyncStatelessMcpToolProvider(List<Object> toolObjects) Create a new SyncStatelessMcpToolProvider. -
Method Summary
Modifier and TypeMethodDescriptionList<io.modelcontextprotocol.server.McpStatelessServerFeatures.SyncToolSpecification>Get the stateless tool specifications.Methods inherited from class org.springaicommunity.mcp.provider.tool.AbstractMcpToolProvider
doGetClassMethods, doGetMcpToolAnnotation, doGetToolCallException, getJsonMapper, setJsonMapper
-
Constructor Details
-
SyncStatelessMcpToolProvider
Create a new SyncStatelessMcpToolProvider.- Parameters:
toolObjects- the objects containing methods annotated withMcpTool
-
-
Method Details
-
getToolSpecifications
public List<io.modelcontextprotocol.server.McpStatelessServerFeatures.SyncToolSpecification> getToolSpecifications()Get the stateless tool specifications.- Returns:
- the list of stateless tool specifications
-