get_table_size_info
Analyze PostgreSQL table sizes and index usage within a schema to monitor storage capacity and identify resource distribution across tables.
Instructions
[Tool Purpose]: Analyze size information and index usage of all tables in specified schema
[Exact Functionality]:
Retrieve size information of all tables within schema
Analyze index size and total size per table
Provide table list sorted by size
[Required Use Cases]:
When user requests "table size", "schema capacity", "index usage", etc.
When storage analysis of specific schema is needed
When resource usage status per table needs to be identified
[Strictly Prohibited Use Cases]:
Requests for table data deletion or cleanup operations
Requests for index creation or deletion
Requests for table structure changes
Args: schema_name: Schema name to analyze (default: "public") database_name: Database name to analyze (uses default database if omitted)
Returns: Information sorted by size including table name, table size, index size, and total size
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| schema_name | No | public | |
| database_name | No |