Class CheckConnectionTool

java.lang.Object
org.gridgain.internal.mcp.tools.CheckConnectionTool

public class CheckConnectionTool extends Object
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

  1. Tool Arguments: Connection parameters explicitly passed by the LLM
  2. Environment Variables: Server-level configuration (GRIDGAIN_HOST, GRIDGAIN_PORT, etc.)
  3. Default Values: Localhost defaults for development
  • 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 the check_database_connection tool.
      Parameters:
      exchange - MCP server exchange
      arguments - tool arguments
      Returns:
      reactive MCP tool result