describe_table
Retrieve complete table metadata including columns, constraints, indexes, size, row count, and sample rows in a single request, replacing multiple database queries.
Instructions
Single rich call describing a table: columns (type/nullable/default + null %/distinct ratio from pg_stats), primary key, foreign keys going OUT (this table → others) AND coming IN (others → this table), all indexes (with definitions), table size, row-count estimate, and sample rows. Replaces ~5 separate calls (get_object_details + LIMIT 5 + COUNT(*) + pg_stats).
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| table | Yes | Table name (unqualified — use schema for the schema). | |
| schema | No | public | |
| sample_size | No | Number of sample rows to fetch (0 to skip). | |
| profile_columns | No | Columns to profile (default: all up to 20). | |
| server | No | ||
| database | No | ||
| override_schema | No | One-time schema override for the connection (separate from `schema` which is the table's schema). |