A Model Context Protocol server for database operations, analysis, and documentation. Supports MySQL, PostgreSQL, and SQL Server with tools for schema inspection, SQL execution, query analysis, ER diagram generation, data flow analysis, and database documentation.
12 tools with visible schemas and descriptions in src/mcp/tools.py. Strengths: all tools have schemas with types and required fields; descriptions present in Chinese with action clarity. Significant gaps: descriptions are functional but often under 50 chars (well below the 194-char production baseline); many parameters lack detailed constraints and actionable guidance; no output schemas documented; error handling not visible in tool definitions; no tool annotations (readOnlyHint/destructiveHint/idempotentHint); composition issues, execute_sql is destructive but no confirmation pattern evident; describe_table, export_db_doc, and generate_* tools have complex optional parameters but lack dependency documentation.
查询指定表的结构信息(字段名、类型、键等)
执行SELECT查询语句,返回查询结果(只读操作)
执行任意SQL语句,包括DDL操作(需要DDL权限)
导出数据库说明文档(数据字典)。含表汇总与字段详情。upload_to_oss=true 或已启用 object_storage 时上传 OSS 并返回下载链接。
生成数据库数据流图。分析表、外键、触发器、视图、存储过程之间的数据流向。upload_to_oss=true 或已启用 object_storage 时上传 OSS 并返回 Markdown/PDF 下载链接。
生成数据库 ER 图。按业务域与表/字段备注归纳实体与属性(非简单一表一实体),分析外键与命名推断关系,输出 Mermaid 图与说明。PDF 含业务实体摘要+按域分片关系图;完整表索引请用 format=markdown。upload_to_oss=true 时上传 OSS 并返回下载链接。
Descriptions significantly below production baseline (194 chars). Most tool descriptions are 20 - 60 chars, providing minimal context for LLM selection. E.g., 'list_connections': only 31 chars. Descriptions should explain WHAT, WHEN, and prerequisites.
No output schemas documented. Tools like list_connections, execute_query, describe_table, generate_er_diagram return complex structured data, but the tool definitions do not specify what fields/types the LLM should expect. This forces LLMs to infer structure.
| Scored | Grade | Overall | Spec posture | Rubric |
|---|---|---|---|---|
| 2026-09-22 | D | 59 | 2026-07-28+ | v2 |
| 2026-03-09 | F | 33 | - | v1 |
列出当前用户有权访问的所有数据库连接。如果不提供 search 参数,则列出全部有权访问的连接。
列出指定连接中的所有数据库
列出指定数据库中的所有存储过程
列出指定数据库中的所有表
列出指定数据库中的所有视图
数据库表字段添加建议工具。指定表名和要添加的字段信息,生成 ALTER TABLE DDL,并分析依赖此表的视图、存储过程等关联对象是否需要同步调整。
execute_sql is destructive (DDL, DML) but lacks confirmation pattern. No dry-run, no warning in description, no permission gate visible. LLMs may execute irreversible operations without user consent.
No tool annotations (readOnlyHint, destructiveHint, idempotentHint) visible in schemas. This prevents clients from applying cost/safety heuristics and audit routing.
Parameter descriptions lack actionable constraints. E.g., 'sql' param in execute_query just says 'SELECT查询语句', no mention of max length, prohibited keywords, timeout, or pagination limits. 'format' enum params (markdown/pdf) lack explanation of when to use which.
Optional parameter dependencies not documented. E.g., export_db_doc has 'format' (markdown/pdf), 'save_path', and 'upload_to_oss', unclear which combinations are valid, what happens if both save_path and upload_to_oss are true, or if save_path is invalid.
No pagination guidance for list_* tools. list_connections, list_databases, list_tables, etc. do not document result limits, pagination tokens, or offset/limit parameters. If a database has thousands of tables, the response could explode the context window.
generate_er_diagram and generate_data_flow have verbose, marketing-style descriptions that obscure the core action. E.g., 'generate_er_diagram' description is 240+ chars and mixes multiple concerns (business domain analysis, implicit relationships, PDF generation). Should be concise: 'Generate an entity-relationship diagram from database schema.'
Error handling not evident in tool definitions. No guidance on what happens if connection_id is invalid, if database does not exist, if SQL is malformed, or if file I/O fails. Descriptions do not indicate retryability or recovery steps.
database parameter is optional in many tools but behavior when omitted is not documented. Does it default to the connection's default database, or fail? Undocumented defaults cause LLM mistakes.