List Tables in Schema
pg_list_tablesList all tables in a PostgreSQL schema with size and row estimates. Optionally include views and materialized views for a comprehensive schema overview.
Instructions
List all tables (and optionally views) in a PostgreSQL schema with size and row estimates.
Args:
schema: Schema name (default: public)
include_views: Also list views and materialized views (default: false)
response_format: Output format
Returns: JSON: { tables: TableInfo[], count: number, schema: string } Markdown: formatted table with size and row estimates
Note: estimated_rows is approximate (pg_class.reltuples) — use pg_count_rows for exact count.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| schema | No | PostgreSQL schema name (default: public) | public |
| include_views | No | Include views and materialized views | |
| response_format | No | Output format: 'markdown' for human-readable, 'json' for machine-readable | markdown |