Package org.machanism.machai.mcp.server
Class StdioMcpServer.StdioToolSpecificationBuilder
java.lang.Object
org.machanism.machai.mcp.server.StdioMcpServer.StdioToolSpecificationBuilder
- All Implemented Interfaces:
AbstractMcpServer.ToolSpecificationBuilder<io.modelcontextprotocol.server.McpSyncServerExchange>
- Enclosing class:
StdioMcpServer
public class StdioMcpServer.StdioToolSpecificationBuilder
extends Object
implements AbstractMcpServer.ToolSpecificationBuilder<io.modelcontextprotocol.server.McpSyncServerExchange>
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionio.modelcontextprotocol.server.McpServerFeatures.SyncToolSpecificationbuildSpecification(Object tool, BiFunction<io.modelcontextprotocol.server.McpSyncServerExchange, io.modelcontextprotocol.spec.McpSchema.CallToolRequest, io.modelcontextprotocol.spec.McpSchema.CallToolResult> callHandler) Builds aSyncToolSpecificationfor the STDIO MCP server.
-
Constructor Details
-
StdioToolSpecificationBuilder
public StdioToolSpecificationBuilder()
-
-
Method Details
-
buildSpecification
public io.modelcontextprotocol.server.McpServerFeatures.SyncToolSpecification buildSpecification(Object tool, BiFunction<io.modelcontextprotocol.server.McpSyncServerExchange, io.modelcontextprotocol.spec.McpSchema.CallToolRequest, io.modelcontextprotocol.spec.McpSchema.CallToolResult> callHandler) Builds aSyncToolSpecificationfor the STDIO MCP server.- Specified by:
buildSpecificationin interfaceAbstractMcpServer.ToolSpecificationBuilder<io.modelcontextprotocol.server.McpSyncServerExchange>- Parameters:
tool- the tool object (should be aMcpSchema.Tool)callHandler- the handler function for tool invocation- Returns:
- a built
SyncToolSpecificationobject
-