Summarize table
summarize_tableGet a single-call overview of any PostgreSQL table: columns, primary/foreign keys, constraints, indexes, storage stats, row count, last vacuum/analyze, and optional row samples, replacing multiple separate tool calls.
Instructions
Return a one-stop snapshot of a table: columns, primary key, foreign keys, every other constraint, indexes, storage + row-count + last-vacuum/analyze stats, and (optionally) a short sample of rows. Replaces what would otherwise be 4-5 individual tool calls. Set sample_rows=0 on wide / jsonb-heavy tables where the sample isn't useful.
Example: summarize_table(schema='public', table='users', sample_rows=5)
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| table | Yes | ||
| schema | Yes | ||
| database | No | Optional: target a configured secondary (read-only) database by name; omit for the primary. Call list_databases to see the configured ids. | |
| sample_rows | No |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| stats | Yes | ||
| table | Yes | ||
| schema | Yes | ||
| columns | Yes | ||
| indexes | Yes | ||
| constraints | Yes | ||
| primary_key | Yes | ||
| sample_rows | Yes | ||
| foreign_keys | Yes |