MCP server for executing custom PostgreSQL queries with optional write protection
Single tool 'query' with minimal definition quality. Tool name lacks action verb clarity (should be 'execute_query' or 'run_sql_query'). Description is only 34 characters, below the 50-char minimum for LLM clarity. Input schema uses bare z.string() with no parameter description, violating the requirement that every parameter must have a description. No output schema documented. No error handling guidance. No input validation hints (SQL injection risk not addressed in tool contract). Tool accepts arbitrary SQL, creating severe security and usability gaps.
Execute custom Postgres SQL query
Tool name 'query' lacks action verb. Should be 'execute_query' or 'run_sql_query' to signal intent clearly to LLMs.
Description 'Execute custom Postgres SQL query' is only 34 characters. Below 50-char minimum. Lacks WHEN to use, prerequisites, and state-modification warning. LLMs cannot determine when to select this tool vs alternatives.
Input parameter 'query' has no description in schema. LLMs cannot infer format, constraints, or examples. Must add description explaining expected SQL syntax, length limits, and allowed statement types.
No output schema documented. Tool returns unstructured text via JSON.stringify(). LLMs cannot plan downstream operations or extract structured data. Must document return type: object with 'rows' array, 'rowCount', 'error' fields.
| Scored | Grade | Overall | Spec posture | Rubric |
|---|---|---|---|---|
| 2026-09-23 | F | 31 | 2026-07-28+ | v2 |
SQL injection vulnerability exposed in tool contract. Tool accepts arbitrary query strings with no sanitization hints. Error responses ('Database connection failed', 'Write operations not allowed') provide no recovery guidance. LLMs cannot self-correct or retry intelligently.