Skip to main content
Glama
ChrisChoTW

databricks-mcp

by ChrisChoTW

search_tables

Find Databricks tables by name using information_schema queries to locate specific data assets across catalogs.

Instructions

Search tables by name (using information_schema)

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
keywordYes
catalogNo

Implementation Reference

  • Implementation of the search_tables tool, which queries the information_schema to find tables matching a keyword.
    def search_tables(ctx: Context, keyword: str, catalog: str = None) -> List[Dict[str, Any]]:
        """Search tables by name (using information_schema)"""
        if not catalog:
            raise ToolError("Must specify catalog parameter")
    
        cat = safe_identifier(catalog, "catalog")
        safe_identifier(keyword, "keyword")  # validate only, no quote needed for LIKE
    
        sql = f"""
        SELECT table_catalog, table_schema, table_name, table_type, comment
        FROM {cat}.information_schema.tables
        WHERE table_name LIKE '%{keyword}%'
        LIMIT 50
        """
        return execute_sql(ctx, sql)

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