Audit database
audit_databaseRun a DBA-level audit of a PostgreSQL schema to detect performance, lock, temp-spill, dead-tuple, and logging issues, returning health scores, top issues, and prioritized recommendations.
Instructions
Run a deep, comprehensive DBA-level database performance, logs, and health audit over the specified schema. Scans memory, checkpoints, temp file spills, contention locks, dead tuple cleanliness, and optionally scans custom logging tables. Set fresh=true to bypass the cache and re-read live (e.g. after a schema change). Returns an object with timestamp, database, version, overall_health ('GOOD' / 'WARNING' / 'CRITICAL'), health_score (int), categories (per-area results), top_issues, recommendations, and raw_stats_snapshot.
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"schema": "<schema>"
},
"name": "audit_database"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| fresh | No | ||
| schema | Yes | ||
| database | No | Optional: a database id from list_databases, to target a configured secondary (read-only) database; omit for the primary. Database names that are not configured ids are rejected. | |
| log_table | No |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| version | Yes | ||
| database | Yes | ||
| timestamp | Yes | ||
| categories | Yes | ||
| top_issues | Yes | ||
| health_score | Yes | ||
| overall_health | Yes | ||
| recommendations | Yes | ||
| raw_stats_snapshot | Yes |