pg-checkup
v0.1.0Read-only PostgreSQL checkups for your AI assistant.
These tools were reported by the server itself during our smoke test (tools/list), not copied from the README.
checkup Run a PostgreSQL checkup
Runs the read-only checkup against the database named in this server's environment (DATABASE_URL, or PGHOST/PGUSER/PGDATABASE with PGPASSWORD or ~/.pgpass) and returns findings in the order to fix them. Takes no connection string. Saves the statistics file so other tools can read it.
| Parameter | Type | Description |
|---|---|---|
max_findings | integer | How many findings to return, most urgent first |
min_severity | string | Leave out findings less severe than this |
show_checkup Read a saved checkup
Analyses a saved checkup file again and returns its findings in the order to fix them. Defaults to the file from the last checkup run.
| Parameter | Type | Description |
|---|---|---|
file | string | |
max_findings | integer | |
min_severity | string |
explain_finding Explain one finding
Returns the full detail of one finding: why it matters, the fix, the evidence rows, and any SQL to review. The SQL is never run by this server.
| Parameter | Type | Description |
|---|---|---|
finding_id * | string | The id of a finding from checkup or show_checkup |
file | string |
handoff Brief for an AI assistant
Builds a structured brief for investigating one finding (the top one by default): what was observed, what is not established, a task, constraints against destructive changes, and how to verify. Use it as the starting message of an investigation.
| Parameter | Type | Description |
|---|---|---|
file | string | |
finding_id | string | Defaults to the most urgent finding |
compare_checkups Compare two checkups
Compares two saved checkups of the same database: what was fixed, what is new or worse, what is still open, and the numbers that changed. Says so when the statistics were reset in between or the files are different databases.
| Parameter | Type | Description |
|---|---|---|
after * | string | |
before * | string |
monitoring_role_sql SQL for a statistics-only login
Returns the SQL that creates a login which can read PostgreSQL statistics but not table data. Run it as an administrator; pg-checkup refuses remote logins with more access than this.
schedule_ci Scheduled checkup workflow
Returns a GitHub Actions workflow that runs the checkup on a schedule and uploads the result. The connection string stays in the repository's secrets.
| Parameter | Type | Description |
|---|---|---|
every | string |