add_dynamic_rls
Generate dynamic row-level security by creating a role (if needed) and setting a USERPRINCIPALNAME()-driven filter on a target table, supporting direct, bridge, hierarchy, or lookup shapes.
Instructions
Generate dynamic row-level security: create the role (if absent) and set a USERPRINCIPALNAME()-driven filter on the SECURED table. shape = direct | bridge | hierarchy | lookup. Never targets the user/mapping table (refused - it would break the lookup).
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": {
"sessionId": "<sessionId>",
"role": "<role>",
"shape": "<shape>",
"securedTable": "<securedTable>",
"securedColumn": "<securedColumn>",
"userTable": "<userTable>",
"userEmailColumn": "<userEmailColumn>",
"userValueColumn": "<userValueColumn>"
},
"name": "add_dynamic_rls"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| role | Yes | role name | |
| shape | Yes | direct | bridge | hierarchy | lookup | |
| sessionId | Yes | ||
| userTable | Yes | the user/security mapping table | |
| pathColumn | No | path column on the user table for the hierarchy shape (optional) | |
| securedTable | Yes | the fact/dimension table to secure | |
| securedColumn | Yes | the column on the secured table to filter | |
| modelPermission | No | model permission for a new role (default Read) | |
| userEmailColumn | Yes | the email/UPN column on the user table | |
| userValueColumn | Yes | the value column on the user table that matches the secured column |