A Model Context Protocol server for PostgreSQL database inspection, query execution, and performance analysis
Server has 10 tools with basic descriptions and parameter definitions, but significant gaps prevent higher scores. All tools are READ_ONLY and well-intentioned for PostgreSQL diagnostics. However: (1) Parameter descriptions are minimal or absent, most tools lack input parameter documentation beyond type names. (2) Output schemas are not documented, LLMs cannot predict what fields to expect from results. (3) Error handling is absent, no guidance on recovery, retryability, or actionable error messages. (4) Tool naming is inconsistent: 'execute' and 'explain' lack verb clarity (execute what? explain what?), while 'get_*' tools are clear. (5) No tool annotations (readOnlyHint, etc.) despite all being read-only. Baseline: 549 production tools average 194-char descriptions; these average ~100 chars with minimal parameter docs.
Executes a SQL query and returns the results.
Executes an EXPLAIN query and returns the execution plan.
Returns database-level health stats: size, connection count, cache hit ratio, deadlocks, and temp file usage.
Returns index usage statistics for all user tables. Highlights unused indexes (idx_scan = 0) sorted by size so you can identify candidates for removal.
Shows currently blocked queries along with the blocking query and PID. Returns an empty result when there are no lock conflicts.
Identifies long-running queries in the database.
Returns the column definitions for a table: data types, nullability, defaults, primary key, and unique constraints.
Output schemas not documented. LLMs cannot predict result structure (field names, types, nesting). Tools return QueryResult or object without schema visibility.
Parameter descriptions missing or minimal. 'query' param in execute/explain lacks format guidance (SQL dialect, size limits). 'tableName' in get_table_schema lacks schema prefix clarification.
No error handling or recovery guidance. Tools return raw QueryResult or object; no indication of what errors are retryable, what requires user intervention, or how to recover from failures.
Inferred effective spec: <=2025-11-25.
| Scored | Grade | Overall | Spec posture | Rubric |
|---|---|---|---|---|
| 2026-09-23 | D | 50 | <=2025-11-25 | v2 |
Returns vacuum and analyze stats for all user tables: live/dead row counts, dead row percentage, and last vacuum/analyze timestamps. Tables with high dead_row_pct need VACUUM.
Lists all user tables in the database with their size and estimated row counts.
Suggests indexes for a given SQL query.
No tool annotations. All tools are read-only (Risk: READ_ONLY declared), but no readOnlyHint annotations in schema. Agents cannot infer safety without explicit hints.
Ambiguous tool names 'execute' and 'explain' lack action clarity. 'execute' could mean execute_query, execute_procedure, or execute_script. 'explain' could mean explain_plan or explain_query. Rename to execute_query and explain_query.