list_schemas
Retrieve all schemas within a specified Databricks catalog to organize and access database structures for querying and metadata exploration.
Instructions
List schemas in the specified catalog
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| catalog_name | Yes |
Implementation Reference
- tools/query.py:46-49 (handler)The list_schemas function executes the "SHOW SCHEMAS IN {catalog}" SQL query to retrieve a list of schemas in a specific catalog, using safe_identifier to prevent SQL injection. It is registered as an MCP tool using the @mcp.tool decorator.
def list_schemas(ctx: Context, catalog_name: str) -> List[Dict[str, Any]]: """List schemas in the specified catalog""" catalog = safe_identifier(catalog_name, "catalog_name") return execute_sql(ctx, f"SHOW SCHEMAS IN {catalog}")