Skip to main content
Glama

Unity Catalog row filters, column masks & ABAC policies

manage_uc_security_policies
Destructive

Control Unity Catalog fine-grained access by getting, setting, or dropping row filters and column masks, plus create, update, or delete ABAC policies with confirmation.

Instructions

Manage Unity Catalog fine-grained access control.

Actions:

  • get(table_name): current row filter + column masks (from table metadata) and ABAC policies in effect.

  • set_row_filter(table_name, function_name, using_columns) / drop_row_filter(table_name)

  • set_column_mask(table_name, column_name, function_name, using_columns?) / drop_column_mask(table_name, column_name) These run ALTER TABLE DDL on a SQL warehouse (warehouse_id optional).

  • list_policies(securable_type, securable_fullname, include_inherited?) / get_policy(+policy_name)

  • create_policy(securable_type, securable_fullname, policy_name, spec) - spec uses PolicyInfo fields: to_principals, for_securable_type, policy_type (POLICY_TYPE_ROW_FILTER|POLICY_TYPE_COLUMN_MASK), row_filter {function_name, using}, column_mask {function_name, on_column, using}, match_columns, when_condition, except_principals, comment.

  • update_policy(..., policy_name, spec, update_mask?) / delete_policy(..., policy_name) All changes are security-sensitive: call without confirm to get a plan showing current vs new state, then repeat with confirm=true. Change responses include an audit block (who/what/when).

Safety classification: get, list_policies, get_policy = READ_ONLY+SECURITY_SENSITIVE; set_row_filter, set_column_mask, create_policy, update_policy = SECURITY_SENSITIVE+WRITE; drop_row_filter, drop_column_mask, delete_policy = DESTRUCTIVE+SECURITY_SENSITIVE+WRITE.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
specNoRequest body fields for create/update, using the Databricks REST API field names (snake_case). Unknown fields are rejected.
actionYesget: current row filter, column masks and ABAC policies on table_name; list_policies / get_policy: ABAC policies on a securable; set_row_filter / drop_row_filter / set_column_mask / drop_column_mask: table-bound UDF filters/masks (SQL DDL on a warehouse); create_policy / update_policy / delete_policy: ABAC policies.
confirmNoSet to true ONLY after the user has reviewed the plan returned by a previous call with status 'confirmation_required'. Required for destructive/security-sensitive actions.
dry_runNoIf true, validate and return the planned change without executing it.
page_sizeNoMax items to return (server caps this).
page_tokenNonext_page_token from a previous response.
table_nameNoTable full name catalog.schema.table.
column_nameNoColumn for set_column_mask / drop_column_mask.
policy_nameNoABAC policy name (get/update/delete/create).
update_maskNoupdate_policy: comma-separated fields to update (default: the keys present in spec).
warehouse_idNoSQL warehouse for filter/mask DDL (default: configured/auto-selected).
function_nameNoFully qualified SQL UDF catalog.schema.function used as row filter or column mask.
using_columnsNoset_row_filter: table columns passed to the filter UDF, in order ([] for none). set_column_mask: additional columns passed after the masked column (USING COLUMNS).
securable_typeNoABAC policies: type of the securable the policy is defined on.
include_inheritedNolist_policies/get: include policies inherited from parent schema/catalog (get defaults to true).
securable_fullnameNoABAC policies: full name of that catalog / schema / table.

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
dataNo
pageNo
planNo
toolYes
actionNo
safetyNo
statusNosuccess
summaryYes
warningsNo
next_stepsNoSuggested follow-up calls.
request_idNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A4.6/5.0
Behavior5/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

Annotations only give a coarse readOnly=false/destructive=true profile for a tool that mixes read-only and destructive actions; the description repairs that gap with an explicit per-action safety classification (READ_ONLY+SECURITY_SENSITIVE vs WRITE vs DESTRUCTIVE). It also discloses the two-step confirm protocol (call without confirm to get a current-vs-new plan, repeat with confirm=true), that filter/mask changes run ALTER TABLE DDL on a SQL warehouse, and that change responses carry an audit block.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

Long but organized as a bulleted action list with the confirmation and safety rules front-loaded, so an agent can scan it. A few lines (e.g., the action enum explanation) restate what the schema already encodes, but overall density is high with little waste.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness5/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

For a 16-parameter, 10-action, security-sensitive tool, the description covers what each action needs, the required confirm/dry_run semantics, DDL execution requirements, and the per-action safety tier. Since an output schema exists, return-value detail is correctly omitted, leaving no meaningful gap.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters4/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema coverage is 100% (baseline 3), but the description adds real meaning the schema cannot: the `spec` parameter is an untyped object in the schema, and the description enumerates its PolicyInfo fields (to_principals, policy_type enum values, row_filter/column_mask sub-shapes, when_condition, except_principals). It also clarifies using_columns differs between set_row_filter and set_column_mask and that warehouse_id is optional for DDL actions.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

Opens with a specific scope statement ('Manage Unity Catalog fine-grained access control') and then enumerates all ten actions with their exact arguments, so an agent knows precisely what each verb does. It is cleanly distinguishable from siblings like manage_uc_grants, manage_uc_tags, and manage_uc_objects by its row-filter/mask/ABAC focus.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines4/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

Gives per-action context ('get: current row filter, column masks and ABAC policies on table_name', the DDL-backed set/drop actions, the ABAC CRUD actions) and states the confirmation workflow clearly. It does not explicitly route the agent away from neighboring UC tools (grants/tags/objects), so the exclusion guidance is implied rather than stated.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.