pg-checkup

v0.1.0
io.github.pgcheckup/pg-checkup Checked 2 days ago Published 7 days ago

Read-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.

ParameterTypeDescription
max_findingsintegerHow many findings to return, most urgent first
min_severitystringLeave 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.

ParameterTypeDescription
filestring
max_findingsinteger
min_severitystring

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.

ParameterTypeDescription
finding_id *stringThe id of a finding from checkup or show_checkup
filestring

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.

ParameterTypeDescription
filestring
finding_idstringDefaults 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.

ParameterTypeDescription
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.

ParameterTypeDescription
everystring