MCP server providing SQL and database tools for AI agents - format, explain, analyze, build, and migrate SQL without a DB connection
Server defines 5 tools with complete input schemas and descriptions. All tools follow verb_noun naming (sql_format, sql_explain, schema_analyze, query_build, migration_generate). Descriptions are present and substantive (100-200 chars, within baseline 194 avg). However, output schemas are NOT documented, tools return JSON-stringified results with no declared structure, forcing LLMs to parse unstructured text. Parameter descriptions are adequate but lack constraint details (e.g., indent_size has no min/max bounds). No error handling guidance, errors return raw messages without recovery hints. All tools are read-only (no destructive operations), reducing risk but also missing idempotent/destructive annotations.
Compare two schemas (old vs new CREATE TABLE statements) and generate ALTER TABLE migration statements with both up and down migrations.
Build SQL queries from natural language descriptions. Example: "get all users who signed up this month and have at least 3 orders" generates the corresponding SQL.
Parse CREATE TABLE statements to extract tables, columns, types, constraints, foreign keys, and indexes. Generates an ER diagram in Mermaid format.
Take a SQL query and explain what it does in plain English, step by step. Identifies tables, columns, conditions, and provides optimization tips.
Format and prettify SQL queries with proper indentation, uppercased keywords, and aligned columns. Supports MySQL, PostgreSQL, and SQLite syntax.
Output schemas not documented. Tools return JSON-stringified text without declaring field structure, forcing LLMs to parse unstructured output and plan downstream calls blindly.
Numeric parameters lack bounds. indent_size accepts any number with no min/max constraint, risking invalid or absurd values (e.g., indent_size=999999).
Error handling provides no recovery guidance. Catch-all error returns raw message without suggesting next steps (e.g., 'Try schema_analyze() first to validate syntax').
Tool annotations missing. No readOnlyHint, destructiveHint, or idempotentHint declared, even though all tools are read-only and idempotent.
| Scored | Grade | Overall | Spec posture | Rubric |
|---|---|---|---|---|
| 2026-09-23 | D | 57 | 2026-07-28+ | v2 |
Parameter descriptions lack format/constraint details. 'dialect' enum is clear, but 'schema_hint' and 'description' (query_build) lack guidance on expected format, length, or complexity.