Package org.gridgain.internal.mcp.tools
Class SqlQueryExecutor
java.lang.Object
org.gridgain.internal.mcp.tools.SqlQueryExecutor
Executes read-only SQL SELECT queries against GridGain.
Features:
- Query validation (SELECT/WITH only)
- LIMIT enforcement (max 1000 rows)
- Query timeout support
- Structured JSON results with metrics
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic McpResponseExecute SQL query using provided connection pool.static reactor.core.publisher.Mono<io.modelcontextprotocol.spec.McpSchema.CallToolResult>handleSelectQuery(io.modelcontextprotocol.server.McpAsyncServerExchange exchange, Map<String, Object> arguments) Handles execution of theconnect_with_retrytool.
-
Constructor Details
-
SqlQueryExecutor
public SqlQueryExecutor()
-
-
Method Details
-
handleSelectQuery
public static reactor.core.publisher.Mono<io.modelcontextprotocol.spec.McpSchema.CallToolResult> handleSelectQuery(io.modelcontextprotocol.server.McpAsyncServerExchange exchange, Map<String, Object> arguments) Handles execution of theconnect_with_retrytool.- Parameters:
exchange- MCP server exchangearguments- tool arguments- Returns:
- reactive MCP tool result
-
execute
Execute SQL query using provided connection pool.- Parameters:
client- shared connection clientquery- SQL SELECT query- Returns:
- MCP response with results or error
-