redshift_list_tables
List all tables in a specific Redshift schema to explore database structure and identify available data tables for querying.
Instructions
List all tables in a specific schema.
Args:
schema: The schema name (default: "public")
Returns:
JSON list of table names
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| schema | No | public |
Implementation Reference
- redshift_mcp_server.py:77-94 (handler)The handler function for the 'redshift_list_tables' tool, decorated with @mcp.tool() for registration. It generates a SQL query to list tables in the specified schema and delegates execution to the 'redshift_query' tool.@mcp.tool() def redshift_list_tables(schema: str = "public") -> str: """ List all tables in a specific schema. Args: schema: The schema name (default: "public") Returns: JSON list of table names """ sql = f""" SELECT table_name FROM information_schema.tables WHERE table_schema = '{schema}' AND table_type = 'BASE TABLE' """ return redshift_query(sql)