Model Context Protocol server for MySQL database inspection and querying
Server has 4 tools with complete schemas and descriptions. Naming follows verb_noun convention (list_, describe_, execute_). Descriptions are adequate (100-200 chars) but lack actionable guidance on when to use each tool vs. alternatives. Parameters are typed with min/max constraints. Critical gap: no output schema documentation for any tool, LLMs cannot plan downstream calls. Error handling exists but lacks recovery guidance. Security: query validation prevents SQL injection but is regex-based and fragile. No pagination support despite potential for large result sets.
Describe the schema of a specific table. Args: table_name: The name of the table to describe. Returns: A list of dictionaries containing column information.
Execute a SELECT query and return the results. This tool only allows SELECT statements for safety. It prevents DROP, DELETE, INSERT, UPDATE, and other potentially dangerous statements. Args: query: The SQL SELECT query to execute. Returns: A list of dictionaries containing the query results. Raises: ValueError: If the query is not a valid SELECT statement.
Execute a data modification query (INSERT, UPDATE, DELETE) and return the results. This tool allows executing DML (Data Manipulation Language) statements that modify data in the database. It explicitly validates that only INSERT, UPDATE, or DELETE statements are executed. WARNING: This tool modifies data. Use with caution. Args: query: The SQL INSERT, UPDATE, or DELETE query to execute. Returns: A dictionary containing: - success: Boolean indicating if the operation was successful - message: Human-readable message describing the result - rows_affected: Number of rows affected by the operation Raises: ValueError: If the query is not a valid INSERT, UPDATE, or DELETE statement.
List all tables in the database. Returns: A list of table names.
No output schema documentation. Tools return list[dict] or dict but LLMs cannot see field names, types, or structure. Breaks downstream tool chaining and forces LLMs to guess field names.
Query validation uses regex and string prefix checks. Fragile against obfuscation (e.g. ' SELECT', '/**/SELECT', comments). SQL injection risk remains despite intent to prevent it.
No pagination support. READ_QUERY_LIMIT exists (1000) but is not exposed to LLM. Large result sets will blow context window. No limit parameter, no offset/page, no next_cursor.
Error messages lack recovery guidance. ValueError exceptions are raised but do not tell LLM what to do next or suggest alternatives.
Inferred effective spec: <=2025-11-25.
| Scored | Grade | Overall | Spec posture | Rubric |
|---|---|---|---|---|
| 2026-09-23 | D | 58 | <=2025-11-25 | v2 |
Descriptions do not explain when to use each tool vs. alternatives. LLM cannot distinguish between execute_read_query and describe_table without trial and error.