List tables in a schema
pg_list_tablesRetrieve tables and views in a schema with their type and estimated row count. Paginate results with limit and offset for large schemas.
Instructions
List tables (and optionally views) in a schema. Returns name, type (table/view/materialized view/foreign), and estimated row count (from reltuples; null = no ANALYZE yet on PG 14+; 0 may mean empty or unanalyzed on PG <= 13). Paginate via limit/offset on very large schemas.
Tool call template
This tool declares no required parameters. Add optional parameters from the input schema as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {},
"name": "pg_list_tables"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| limit | No | Max rows to return (default 500, max 10000). | |
| offset | No | Rows to skip for pagination (default 0). | |
| schema | No | Schema name (defaults to 'public'). | public |
| includeViews | No | If true, include views and materialized views. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| rows | Yes |