list_tables
Retrieve all tables within a specified Databricks schema and catalog to explore available data structures.
Instructions
List tables in the specified schema
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| catalog_name | Yes | ||
| schema_name | Yes |
Implementation Reference
- tools/query.py:52-57 (handler)The handler implementation for the `list_tables` MCP tool, which sanitizes identifiers and executes a SQL query.
@mcp.tool def list_tables(ctx: Context, catalog_name: str, schema_name: str) -> List[Dict[str, Any]]: """List tables in the specified schema""" catalog = safe_identifier(catalog_name, "catalog_name") schema = safe_identifier(schema_name, "schema_name") return execute_sql(ctx, f"SHOW TABLES IN {catalog}.{schema}")