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
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"catalog_name": "<catalog_name>"
},
"name": "list_schemas"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| catalog_name | Yes |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| result | 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}")