{"record":{"id":"e8b084e837ffcc78","repo":"apache/shardingsphere","slug":"the-configured-runtime-does-not-support-rule-inspe","errorCode":null,"errorMessage":"The configured runtime does not support rule inspection DistSQL.","messagePattern":"The configured runtime does not support rule inspection DistSQL\\.","errorType":"exception","errorClass":"MCPUnsupportedException","httpStatus":null,"severity":"error","filePath":"mcp/support/src/main/java/org/apache/shardingsphere/mcp/support/workflow/service/WorkflowDistSQLQueryUtils.java","lineNumber":55,"sourceCode":"    private static boolean isUnsupportedDistSQLQueryFailure(final MCPQueryFailedException ex) {\n        return MCPJDBCErrorCategory.SYNTAX == MCPJDBCExceptionClassifier.classify(ex);\n    }\n    \n    /**\n     * Query DistSQL rule rows.\n     *\n     * @param queryFacade query facade\n     * @param databaseName database name\n     * @param sql DistSQL to execute\n     * @return queried rows\n     * @throws MCPUnsupportedException when the configured runtime does not support rule inspection DistSQL\n     */\n    public static List<Map<String, Object>> queryRuleRows(final MCPFeatureQueryFacade queryFacade, final String databaseName, final String sql) {\n        try {\n            return queryFacade.query(databaseName, sql);\n        } catch (final MCPQueryFailedException ex) {\n            if (isUnsupportedDistSQLQueryFailure(ex)) {\n                throw new MCPUnsupportedException(\"The configured runtime does not support rule inspection DistSQL.\", ex);\n            }\n            throw ex;\n        }\n    }\n    \n}\n","sourceCodeStart":37,"sourceCodeEnd":62,"githubUrl":"https://github.com/apache/shardingsphere/blob/e952770a215630a3659c75d64369168cd3e26b82/mcp/support/src/main/java/org/apache/shardingsphere/mcp/support/workflow/service/WorkflowDistSQLQueryUtils.java#L37-L62","documentation":"Wraps an MCPQueryFailedException as MCPUnsupportedException when WorkflowDistSQLQueryUtils detects the failure means the runtime cannot execute rule-inspection DistSQL (e.g. SHOW SHARDING TABLE RULES). It signals a capability gap of the connected ShardingSphere runtime, not a bad query or a transient database failure; other query failures are rethrown unchanged.","triggerScenarios":"Running an MCP workflow/query tool that needs rule inspection DistSQL against a runtime that does not implement DistSQL (ShardingSphere-JDBC driver mode) or an older Proxy version where the specific SHOW statement is unavailable, so queryFacade.query throws a failure classified as unsupported.","commonSituations":"Pointing the MCP server at a ShardingSphere-JDBC data source instead of the Proxy, mixing MCP server version with an older Proxy build, or using a storage-only database type that lacks DistSQL support.","solutions":["Attach the MCP server to a ShardingSphere Proxy runtime that supports the required rule inspection DistSQL.","Upgrade the ShardingSphere runtime so the DistSQL statements the tool issues are implemented.","For read-only introspection on unsupported runtimes, query the underlying storage databases directly instead of the DistSQL-backed tools."],"exampleFix":null,"handlingStrategy":"try-catch","validationCode":null,"typeGuard":null,"tryCatchPattern":"try {\n    WorkflowDistSQLQueryUtils.queryRuleRows(queryFacade, databaseName, sql);\n} catch (final MCPUnsupportedException ex) {\n    // runtime lacks DistSQL: switch to a Proxy runtime or query storage directly; do not retry unchanged\n}","preventionTips":["Attach MCP tooling to ShardingSphere Proxy, not raw JDBC mode, when DistSQL-backed tools are needed","Check DistSQL support for your Proxy version before building workflows on it","Keep MCP server and ShardingSphere runtime versions aligned"],"tags":["mcp","distsql","unsupported-feature","compatibility"],"backgroundTag":null,"analyzedSha":"e952770a215630a3659c75d64369168cd3e26b82","analyzedAt":"2026-08-14T13:54:53.392Z","schemaVersion":2},"datasetVersion":"2026-08-15T17:31:12.345Z"}