Skip to main content
Glama
ChrisChoTW

databricks-mcp

by ChrisChoTW

get_table_schema

Retrieve the complete structure of Databricks tables, including column definitions and extended metadata, to understand data organization and relationships.

Instructions

Get table structure (DESCRIBE EXTENDED)

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
catalog_nameYes
schema_nameYes
table_nameYes

Implementation Reference

  • The get_table_schema tool implementation, registered with @mcp.tool, validates identifiers and executes a DESCRIBE EXTENDED SQL query.
    @mcp.tool
    def get_table_schema(ctx: Context, catalog_name: str, schema_name: str, table_name: str) -> List[Dict[str, Any]]:
        """Get table structure (DESCRIBE EXTENDED)"""
        catalog = safe_identifier(catalog_name, "catalog_name")
        schema = safe_identifier(schema_name, "schema_name")
        table = safe_identifier(table_name, "table_name")
        return execute_sql(ctx, f"DESCRIBE EXTENDED {catalog}.{schema}.{table}")

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/ChrisChoTW/databricks-mcp'

If you have feedback or need assistance with the MCP directory API, please join our Discord server