whodb_tables
List all tables in a database schema with metadata like row counts. Optionally include column details to understand table structure in one call.
Instructions
List all tables in a database schema.
Best for: Discovering what tables exist in a schema; getting table metadata like row counts. Not recommended for: When you already know the table name (proceed directly to whodb_columns or whodb_query). Common mistakes: Not specifying schema when the database has multiple schemas with same-named tables.
Usage Example:
{
"name": "whodb_tables",
"arguments": {
"connection": "mydb",
"schema": "public"
}
}Returns: Array of table objects with name and attributes (row count, size, etc.). Note: If schema is omitted, uses the connection's default schema or the first available schema.
Optional parameter: Set "include_columns": true to also return column details (name, type, primary key, foreign keys) for each table. This saves you separate whodb_columns calls and gives you everything needed to write queries in a single round-trip.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| connection | Yes | Connection name (optional if only one exists) | |
| schema | No | Schema name (uses default if omitted) | |
| include_columns | No | Set true to also return column details for each table in a single call |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| tables | Yes | ||
| schema | Yes | ||
| error | No | ||
| request_id | No |