table_stats
Retrieve approximate row counts and disk/index sizes per table, ordered by total size, using database statistics without table scans to plan migrations and spot size anomalies.
Instructions
Approximate row counts and disk/index sizes per table, largest first.
Uses the database's own statistics — fast, no table scans. Useful for planning
migration copy order and spotting anomalies. One row per table, so the full
answer may be large on a big database — ask the narrower question instead of
filtering afterwards: table for one table (optionally schema-qualified),
min_size_bytes to skip anything smaller, limit for the top N by total size.
With limit set the result carries truncated: true when more tables matched
than were returned.
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"database": "<database>"
},
"name": "table_stats"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| limit | No | ||
| table | No | ||
| database | Yes | ||
| min_size_bytes | No |