MCP server that provides tools for mathematical operations and MySQL database queries
This server has fundamental quality gaps across naming, descriptions, parameter documentation, and error handling. Both tools are directly visible and registered in index.js. While schemas are present, they lack proper parameter descriptions, and tool descriptions are minimal. The 'query_mysql' tool has critical security issues (hardcoded credentials, commented-out query validation). Error handling exists but is generic and doesn't guide recovery. Naming follows verb_noun convention but descriptions are inadequate for LLM tool selection.
Execute a SELECT query on the MySQL database
Add two or more numbers together
Credentials hardcoded in source code. dbConfig object contains plaintext host, user, password, and database name. Must use environment variables or server-side secret injection.
SQL injection vulnerability. query_mysql accepts arbitrary SQL with validation commented out. No parameterized queries, input sanitization, or allowlist. LLMs can be prompt-injected to pass malicious payloads.
Parameter descriptions missing. 'numbers' param in sum tool has a description, but 'query' param in query_mysql lacks clarity on format, expected structure, or constraints. LLMs cannot infer parameter meaning from names alone.
Tool descriptions are too brief (under 50 chars). 'Add two or more numbers together' (37 chars) and 'Execute a SELECT query on the MySQL database' (46 chars) lack context for when/why to call them. Baseline is 194 chars average for production tools.
| Scored | Grade | Overall | Spec posture | Rubric |
|---|---|---|---|---|
| 2026-09-22 | F | 44 | 2026-07-28+ | v2 |
| 2026-03-09 | F | 28 | - | v1 |
Error handling is generic. 'Error executing query: [error.message]' gives the LLM no recovery path. Should categorize errors as retryable/user-fixable/fatal and include the invalid value and constraint violated.
No output schema documented. Tools return text content via JSON.stringify() for query_mysql, but the structure and fields are not documented. LLMs need to know what fields to extract for downstream tool calls.
query_mysql lacks pagination and result limits. No limit parameter, no offset/page parameter, no total count returned. If a SELECT returns thousands of rows, the response could exhaust the context window.
No permission gates or audit logging. query_mysql directly executes against the database with no user authentication, permission checks, or logging of who called what. Not suitable for multi-user environments.