pgmcp exposes a PostgreSQL server for read-only diagnosis: every tool and resource runs inside a READ ONLY transaction with a statement timeout, so nothing here can change data, schema, or server configuration.
pgmcp provides 9 read-only diagnostic tools for PostgreSQL. Tool naming follows verb_noun convention (index_health, top_queries, lock_waits). Two tools (index_health, query) have detailed descriptions (100+ chars) explaining WHEN to use them and what they return. However, 7 of 9 tools lack visible descriptions in the provided source, only inferred from test files. Input schemas are partially visible: index_health shows proper JSON Schema with typed parameters and descriptions; query is documented as bounded and read-only. The remaining 7 tools have no visible schema definitions in the source code provided. Output schemas are not documented. Error handling is not evident from the code sample. The server correctly avoids exposing secrets as parameters (read-only tools, no credentials in params). Composition is sound: each tool has a single responsibility (health checks, query analysis, diagnostics).
Reports the indexes worth acting on: never scanned, duplicated by another index, left invalid by a failed CREATE INDEX CONCURRENTLY, or estimated to be bloated. Use it when asked which indexes can be dropped, why writes are slow, or where disk space has gone. Each finding may carry a drop_candidate_sql string for a human to review — this server only ever reads and never runs it.
A bounded escape hatch for ad hoc SELECTs: it is row- and time-limited, rejects any statement that is not read-only, may be restricted to specific schemas, and may be switched off entirely by the operator.
7 of 9 tools lack visible descriptions and input schemas in source code. Only index_health and query have documented descriptions; the rest are inferred from test files or missing entirely.
No output schemas documented for any tool. LLMs cannot plan downstream calls or extract required fields without knowing the response structure.
No error handling guidance visible. Tools do not indicate what errors are retryable, user-fixable, or fatal, or provide recovery suggestions.
Inferred effective spec: 2026-07-28+.
| Scored | Grade | Overall | Spec posture | Rubric |
|---|---|---|---|---|
| 2026-09-23 | F | 41 | 2026-07-28+ | v2 |
query tool accepts SQL input but no validation rules documented (row limit, time limit, schema restrictions mentioned in description but not in schema constraints).
No pagination parameters visible for tools that likely return lists (top_queries, connections, replication). Large result sets risk context window exhaustion.