SQL intelligence layer for LLM agents — phase-locked generation, property graph schema, 10-dialect support
SQLMind MCP server has significant definition quality gaps. Tool naming is inconsistent (duplicate tools: find_join_path, validate_sql, get_dialect_rules, export_erd appear 2-3 times each). Descriptions are present but often generic or incomplete, many lack actionable context for LLM selection. Parameter schemas are defined with types and descriptions, but output schemas are undocumented (tools return JSON strings without declared structure). Error handling is minimal; most tools return JSON error objects without recovery guidance. No tool annotations (readOnlyHint, destructiveHint, idempotentHint) despite all tools being read-only. The server lacks composition guidance, no clear sequencing hints (e.g., 'call get_schema_context before generate_sql' is mentioned in one description but not enforced or documented consistently).
Export the loaded schema as a Mermaid ERD diagram string.
Export the loaded schema as a Mermaid ERD diagram. Paste output into mermaid.live or a GitHub README to visualize.
Find the shortest join path between two tables in the schema graph. Use this when you need to join tables that aren't directly related.
Find the shortest FK-based join path between two tables. Use when tables are not directly related via a single foreign key.
Generate phase-locked SQL from a natural language query. Internally reasons in execution order: FROM→WHERE→GROUP BY→HAVING→SELECT→ORDER BY→LIMIT. Always call get_schema_context first and pass its output here.
Get syntax rules and gotchas for a specific SQL dialect. Use this when generating SQL for an unfamiliar dialect.
Duplicate tool definitions: find_join_path, validate_sql, get_dialect_rules, and export_erd are registered 2 - 3 times across different integration files (sqlmind_google_adk.py, sqlmind_langgraph.py). This creates ambiguity for LLM tool selection and violates single-responsibility principle.
Output schemas are undocumented. Tools return JSON strings (e.g., sqlmind_introspect returns {status, table_count, column_count, fk_edge_count, schema_dsl, usage}) but the MCP tool definition does not declare the output schema structure. LLMs cannot plan downstream calls or extract fields reliably.
No tool annotations despite all tools being read-only. Missing readOnlyHint annotations prevent LLMs from understanding which tools are safe to call speculatively or in dry-run mode. This is a current MCP spec feature (2026-07-28).
| Scored | Grade | Overall | Spec posture | Rubric |
|---|---|---|---|---|
| 2026-09-23 | C | 64 | 2026-07-28+ | v2 |
Get syntax rules and functions for a SQL dialect.
Given a natural language query, return relevant schema context: matched tables, columns, join paths, and the full SQLMind DSL. This is the schema-linking step — call this before generate_sql.
Load a database schema into the SQLMind graph. Accepts: connection string, .sqlmind.yaml file, DDL .sql file, or inline SQLMind DSL text.
Map a natural language query to schema nodes (tables, columns, join paths). Always call before generate_sql. Returns schema DSL + matched elements.
Introspect a live database and return a SQLMind Schema DSL — a compact, token-efficient representation of all tables, columns, primary keys, foreign keys, and indexes. Supports: postgresql, mysql, sqlite, mssql. Pass the full connection string.
Given a natural language query and a schema (SQLMind DSL or JSON), performs schema linking: identifies which tables and columns are relevant, detects join paths, infers filters/groups/metrics, and classifies complexity. Run this BEFORE sqlmind_generate to improve accuracy.
Validates a SQL query through the SQLMind 7-phase execution model. Checks for: wrong clause ordering, aggregate-in-WHERE errors, missing GROUP BY columns, alias-in-WHERE errors, Cartesian JOIN risks, LEFT JOIN nullification, and dialect-specific issues. Returns a structured validation report with errors, warnings, and fixes.
Validate a SQL query against the SQLMind 7-phase execution model. Checks for: aggregate-in-WHERE, alias-in-WHERE, missing GROUP BY columns, Cartesian JOINs, LEFT JOIN nullification, wrong dialect syntax.
Validate SQL against SQLMind's 7-phase execution model. Catches: aggregate-in-WHERE, alias-in-WHERE, Cartesian JOINs, LEFT JOIN nullification, missing GROUP BY, dialect syntax errors, and column/table name errors against the schema graph.
Error handling lacks recovery guidance. Tools return JSON error objects (e.g., {error: str(e), fallback: ...}) but do not categorize errors as retryable, user-fixable, or fatal. LLMs cannot determine next steps without explicit guidance.
Inconsistent parameter naming and missing constraints. Parameters like 'dialect' appear across tools but lack enum constraints in visible schemas. Parameter 'tables_filter' accepts comma-separated strings without format validation. Descriptions mention constraints (e.g., 'postgresql, mysql, sqlite, mssql') but schemas do not enforce them.