PostgreSQL MCP server for natural language to SQL conversion and database interaction
Server has 7 tools with mixed quality. Tools 1-3 (connect, disconnect, pg_query) have basic schemas and descriptions but lack depth. Tools 4-7 are prompts, not executable tools, they guide LLM behavior but don't perform actions. Naming is verb-forward (good), but descriptions are generic and lack context on when/why to use each tool. No parameter validation guidance, no error recovery hints, and no output schema documentation visible. Schemas present but minimal; many descriptions under 100 chars lack actionable detail.
Register a PostgreSQL connection and return its UUID identifier
Close a specific database connection pool
Prompt to guide AI agents in converting natural language queries to SQL with PostgreSQL
Prompt to guide AI agents in generating appropriate Vega-Lite visualizations based on SQL query results, metadata, and database context
Prompt to evaluate if a SQL query correctly answers a natural language question and provide an explanation of how the query works
Execute a SQL query against a registered PostgreSQL connection
Prompt to determine if the user's query is answerable by the database and that a query can be generated. User input is evaluated on clarity/vagueness and also relevancy to the schema
Prompts (tools 4-7) lack executable semantics. 'generate_vega', 'generate_sql', 'validate_nl', 'justify_sql' are prompt templates, not tools that perform actions. They guide LLM reasoning but don't return structured results. Descriptions don't clarify this distinction or explain what the LLM should do with the prompt output.
No output schema documentation. Tools return results but no schema is visible for what fields/structure the LLM should expect. pg_query likely returns rows, but format is undocumented. Agents cannot plan downstream calls without knowing response structure.
Descriptions lack actionable context. 'Execute a SQL query against a registered PostgreSQL connection' (pg_query) doesn't explain when to use it vs other tools, what errors might occur, or how to handle them. Descriptions average ~50 chars; baseline is 194 chars for A+ tools.
Inferred effective spec: <=2025-11-25.
| Scored | Grade | Overall | Spec posture | Rubric |
|---|---|---|---|---|
| 2026-09-23 | C | 63 | <=2025-11-25 | v2 |
No error handling guidance. Tools don't document what errors are possible (e.g., invalid connection_id, SQL syntax error, database unreachable) or how the LLM should recover. No recovery hints like 'If connection fails, call connect() first.'
Parameter descriptions are minimal. 'conn_id' appears in 5 tools but is never described as 'UUID returned by connect()' or 'required; invalid IDs cause errors.' LLMs cannot infer parameter semantics from names alone.