profile_table
Generate a statistical profile of a database table via SQL: returns a compact Markdown summary with row counts, null percentages, distinct values, min/max/avg, and top-5 categorical distributions.
Instructions
Generate a statistical profile of a database table.
All aggregation is performed directly in the database via SQL queries. No rows are transferred to local memory. Returns a compact Markdown summary suitable for AI context (< 150 tokens overhead per column).
Includes for every column:
Row count and null percentage
Distinct value count
Min / Max / Avg (numeric and date columns)
Top-5 value distribution for categorical columns (<= 100 distinct values)
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| connection | Yes | Database alias (from connect_database). | |
| table_name | Yes | Name of the table to profile. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| result | Yes |