Production-ready MCP server for SQL Server with comprehensive SQL review, query execution, schema introspection, and best practices analysis
Server has 6 tools with mixed quality. Naming is generally verb-based and clear (review_sql_script, query_readonly, schema_summary, explain, config_info, get_best_practices). All tools have descriptions ranging from 40-250 chars, meeting the 10-1024 char baseline. Input parameters are documented and mostly well-described. However, schemas lack explicit JSON Schema type declarations in the visible code, parameter types are inferred from Python type hints (str, Optional[int]) but not formally registered in JSON Schema format. Output schemas are not documented, violating the pattern:tool requirement. Error handling is not visible in the provided code. The query_readonly tool has good parameter descriptions including pagination constraints (max 1000 rows), but no explicit validation or error recovery guidance in the definition itself.
Return public configuration settings (sanitized).
Get the estimated execution plan (XML) for a query without executing it.
Get all SQL Server best practices defined by DBAs. Returns comprehensive guidelines for query optimization.
Exectute a READ-ONLY SQL query (SELECT only). Strictly prohibits: - UPDATE, DELETE, INSERT, MERGE - DDL (CREATE, ALTER, DROP) - Multi-statement batches
Perform a comprehensive, production-safe review of an SQL script. Returns a structured QA report with: - Security analysis (AST) - Performance insights (Execution Plan) - Best practice violations - Schema validation
Get a token-efficient summary of the database schema.
Output schemas not documented. Tools return Dict[str, Any] but do not specify what fields agents should expect. Violates pattern:tool requirement for documented return types. Agents cannot plan downstream calls or extract required fields reliably.
Input schemas not explicitly registered as JSON Schema. Parameter types are Python type hints only (str, Optional[int], Optional[str]). FastMCP may auto-generate JSON Schema from these hints, but no explicit schema definitions are visible. Cannot verify that schemas match the pattern:tool-description and pattern:constrained-input baselines.
Inferred effective spec: <=2025-11-25.
| Scored | Grade | Overall | Spec posture | Rubric |
|---|---|---|---|---|
| 2026-09-22 | F | 44 | <=2025-11-25 | v2 |
| 2026-03-09 | F | 45 | - | v1 |
schema_summary, explain, and get_best_practices lack sufficient parameter descriptions. 'env' described only as 'Optional environment override' without specifying valid values (Int, Stg, Prd mentioned in query_readonly but not here). Violates baseline: 100% of A+ tool params have descriptions.
query_readonly uses pagination parameters (page_size, page) but does not document the output structure for paginated results. Should specify total count, next_cursor, or page metadata. Violates pattern:paginated-result.
explain tool description is only 50 chars ('Get the estimated execution plan (XML) for a query without executing it.'). While non-empty, it omits WHEN to use this tool vs query_readonly, what the XML structure contains, and what the agent should do with the output. Lacks context for tool selection.
No error handling visible in tool definitions. Code shows return types but not error recovery guidance. Tools like query_readonly that enforce constraints (no UPDATE/DELETE/INSERT) should document what happens if an agent passes a non-SELECT statement, is it rejected? How is the error reported? Pattern:recovery-guide not followed.
config_info has empty input schema ({}) and generic description ('Return public configuration settings (sanitized).'). Does not explain what specific settings are returned or how an agent should interpret them. Baseline: descriptions should be 10-1024 chars and answer WHAT, WHEN, and WHAT IT RETURNS.
review_sql_script description mentions 'Security analysis (AST)', 'Performance insights (Execution Plan)', 'Best practice violations', and 'Schema validation' but does not specify which fields contain which data in the returned object. Agents cannot extract the security analysis separately from performance insights.