Skip to main content
Glama
ChrisChoTW

databricks-mcp

by ChrisChoTW

get_grants

View permissions for Databricks objects like tables, schemas, and catalogs by specifying the object type and full name to check access rights.

Instructions

View object permissions (SHOW GRANTS)

Args: securable_type: Object type (TABLE, SCHEMA, CATALOG, VOLUME, etc.) full_name: Full object name (catalog.schema.table format)

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
securable_typeYes
full_nameYes

Implementation Reference

  • The get_grants tool handler executes the 'SHOW GRANTS' SQL command to retrieve permissions for a specified Unity Catalog object. It includes input validation for the securable type and the object name components.
    def get_grants(ctx: Context, securable_type: str, full_name: str) -> List[Dict[str, Any]]:
        """
        View object permissions (SHOW GRANTS)
    
        Args:
            securable_type: Object type (TABLE, SCHEMA, CATALOG, VOLUME, etc.)
            full_name: Full object name (catalog.schema.table format)
        """
        validated_type = validate_securable_type(securable_type)
        # Validate and quote full_name parts
        parts = full_name.split(".")
        quoted_parts = []
        for part in parts:
            validate_identifier(part, "full_name component")
            quoted_parts.append(quote_identifier(part))
        quoted_full_name = ".".join(quoted_parts)
        return execute_sql(ctx, f"SHOW GRANTS ON {validated_type} {quoted_full_name}")

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