apache/shardingsphere · error · MCPUnsupportedException
The configured runtime does not support rule inspection Dist
Error message
The configured runtime does not support rule inspection DistSQL.
What it means
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.
Source
Thrown at mcp/support/src/main/java/org/apache/shardingsphere/mcp/support/workflow/service/WorkflowDistSQLQueryUtils.java:55
private static boolean isUnsupportedDistSQLQueryFailure(final MCPQueryFailedException ex) {
return MCPJDBCErrorCategory.SYNTAX == MCPJDBCExceptionClassifier.classify(ex);
}
/**
* Query DistSQL rule rows.
*
* @param queryFacade query facade
* @param databaseName database name
* @param sql DistSQL to execute
* @return queried rows
* @throws MCPUnsupportedException when the configured runtime does not support rule inspection DistSQL
*/
public static List<Map<String, Object>> queryRuleRows(final MCPFeatureQueryFacade queryFacade, final String databaseName, final String sql) {
try {
return queryFacade.query(databaseName, sql);
} catch (final MCPQueryFailedException ex) {
if (isUnsupportedDistSQLQueryFailure(ex)) {
throw new MCPUnsupportedException("The configured runtime does not support rule inspection DistSQL.", ex);
}
throw ex;
}
}
}
View on GitHub (pinned to e952770a21)
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.
Defensive patterns
Strategy: try-catch
Try / catch
try {
WorkflowDistSQLQueryUtils.queryRuleRows(queryFacade, databaseName, sql);
} catch (final MCPUnsupportedException ex) {
// runtime lacks DistSQL: switch to a Proxy runtime or query storage directly; do not retry unchanged
} Prevention
- 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
When it happens
Trigger: 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.
Common situations: 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.
Related errors
- target_status is required for readwrite-splitting status.
- Unknown blob information request type %d
- Unknown database information request type %d
- Unknown database information request type %d
- Unknown statement info request type %d
AI-assisted analysis of apache/shardingsphere@e952770a21 (2026-08-14).
Data as JSON: /api/errors/e8b084e837ffcc78.
Report an issue: GitHub.