Package org.gridgain.internal.mcp.tools
Class CheckConnectionTool
java.lang.Object
org.gridgain.internal.mcp.tools.CheckConnectionTool
MCP tool for validating GridGain database connectivity and health.
This tool performs a quick connection check by executing a simple SELECT 1
query against the configured GridGain cluster. It supports flexible connection configuration
through a three-tier fallback mechanism: tool arguments, environment variables, and defaults.
Connection Configuration Priority
- Tool Arguments: Connection parameters explicitly passed by the LLM
- Environment Variables: Server-level configuration (GRIDGAIN_HOST, GRIDGAIN_PORT, etc.)
- Default Values: Localhost defaults for development
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic reactor.core.publisher.Mono<io.modelcontextprotocol.spec.McpSchema.CallToolResult>handleCheckConnection(io.modelcontextprotocol.server.McpAsyncServerExchange exchange, Map<String, Object> arguments) Handles execution of thecheck_database_connectiontool.
-
Constructor Details
-
CheckConnectionTool
public CheckConnectionTool()
-
-
Method Details
-
handleCheckConnection
public static reactor.core.publisher.Mono<io.modelcontextprotocol.spec.McpSchema.CallToolResult> handleCheckConnection(io.modelcontextprotocol.server.McpAsyncServerExchange exchange, Map<String, Object> arguments) Handles execution of thecheck_database_connectiontool.- Parameters:
exchange- MCP server exchangearguments- tool arguments- Returns:
- reactive MCP tool result
-