连接到MySQL数据库的高级工具集,支持安全查询、分页显示、日志记录等功能
MySQL MCP server presents 5 tools with partial schemas and mixed-quality descriptions. All tools are READ_ONLY (low risk), but suffer from: (1) Chinese-language descriptions that are non-standard for LLM tooling (descriptions are technically present but not optimized for English-speaking LLMs); (2) inconsistent parameter documentation, some params have descriptions, others are vague; (3) no visible output schema documentation in the source; (4) missing error handling guidance; (5) inferred tool definitions (not seeing explicit tool registration in the provided source snippet). The mysql_query tool accepts a sessionId parameter with a cryptic description ('最好是传入一个6位长度的数字并记住,例如123456') that hints at domain-specific session management but lacks clarity on how pagination state persists. The pagination_control tool multiplexes five actions into one endpoint, violating the single-responsibility principle. Parameter schemas are present in Zod format but descriptions are sparse and localized.
获取表的DDL语句
安全执行MySQL查询语句并返回结果,支持分页和日志记录
获取数据库表结构信息,支持按表名过滤
控制查询结果的分页显示
获取SQL查询执行日志
Chinese-language descriptions are non-standard for LLM tooling. English-speaking LLMs may struggle to parse intent from localized text, and multi-language descriptions invite inconsistency. All descriptions should be in English for broad LLM compatibility.
No output schema documentation visible in source code. LLMs cannot predict what fields will be returned, forcing them to reason about downstream tool chaining and risking failed calls. Document return types for all tools.
pagination_control multiplexes five distinct actions (next, previous, goto, info, clear) into a single tool. This violates single-responsibility: next_page, previous_page, goto_page, get_pagination_info, and clear_pagination would be clearer, allowing the LLM to invoke each independently and reason about outcomes separately.
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 | 30 | - | v1 |
mysql_query sessionId parameter has vague documentation ('最好是传入一个6位长度的数字并记住,例如123456'). Missing: (1) what happens if sessionId is omitted; (2) whether sessionId persistence is client-side or server-side; (3) whether concurrent sessionIds are supported. LLM cannot safely manage pagination without this clarity.
No error handling guidance or recovery paths. If mysql_query fails due to SQL validation error, malformed parameters, or timeout, the tool does not return actionable next steps ('Try search_schema() first', 'Invalid SQL syntax: check for unclosed quotes'). Raw error messages give LLM nothing to act on.
mysql_query enablePagination defaults to undefined and auto-decides based on result size threshold. This implicit behavior is not documented. LLM cannot predict whether a large query will return paginated or raw results, leading to unpredictable downstream handling. Explicit default (e.g. 'enablePagination: false, auto-enable if result > 200 items') required.
mysql_schema 'detailed' parameter defaults to true but description says it's optional. Inconsistency: either the parameter is optional with a false default, or it is required. LLM will pass both true and false interchangeably if default behavior is ambiguous.
No permission/scope declarations. These tools access arbitrary MySQL queries and database schemas. No indication whether the agent has read-only access, whether it can drop tables, or whether certain databases are restricted. Missing audit trail logging, who invoked each query, when, and with what result.
pagination_control 'page' parameter is optional but only applies to 'goto' action. No validation or dependency documentation. LLM may pass page to 'next' or 'previous' actions where it is ignored, wasting reasoning and creating silent failures.
Tool registration is inferred from source code snippets but full registration code not visible (only mysql-tools.js excerpt shown). Cannot confirm explicit MCP SDK registration, tool ID generation, or whether schemas are properly exported to the MCP server runtime.