Skip to main content
Glama

setup_rls_and_roles

Configure Row-Level Security roles and DAX table filters in a TMDL model, then validate security rules against sample queries with optional rollback.

Instructions

Configure Row-Level Security (RLS) roles and validation rules in a TMDL model.

Use this tool when the user asks to:

  • Set up, add, or configure RLS roles and DAX table filter expressions.

  • Test and validate security rules against sample queries.

Args: target: Target PBIP directory or TMDL path. spec_yaml: YAML specification of security roles, members, and DAX filters. spec_json: JSON specification (either as a string or a structured object/dict). dry_run: If True, validate role specification without writing to disk. rollback_on_test_failure: Whether to revert modifications if test queries fail.

Returns: Dict with roles created, test query outcomes, and rollback status if applicable.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
targetYes
dry_runNo
spec_jsonNo
spec_yamlNo
rollback_on_test_failureNo

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changedv1.11.0
    • removedInput schema / properties / spec_json / anyOf
      Removed value: -[
      -  {
      -    "type": "string"
      -  },
      -  {
      -    "type": "null"
      -  }
      -]
  2. First observedv0.1.0

TDQS

A4.4/5.0
Behavior4/5

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

With no annotations, the description carries the full behavioral burden. It usefully discloses that dry_run validates without writing to disk and that rollback_on_test_failure can revert changes, which are important safety semantics for a mutating setup tool. It still omits permissions, overwrite behavior, and broader side effects.

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?

The description is front-loaded with purpose, then usage, args, and returns in a clear structure. The Returns section is somewhat redundant because an output schema exists, but the overall text remains efficient and easy to scan.

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

Completeness4/5

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

For a five-parameter RLS setup tool with no annotations and an output schema, the description covers purpose, usage, arguments, and return shape. It is nearly complete, though it does not explain the expected schema of spec_yaml/spec_json beyond high-level contents, which would help an agent construct the call.

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

Parameters5/5

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

Schema description coverage is 0%, but the description documents all five parameters: target, spec_yaml, spec_json, dry_run, and rollback_on_test_failure. It adds substantive meaning beyond the bare schema titles, including the YAML/JSON spec contents and the write/validation behavior of the boolean flags.

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?

The description states a specific verb and resource: 'Configure Row-Level Security (RLS) roles and validation rules in a TMDL model.' That is distinguishable from siblings such as set_sensitivity_labels or apply_theme_and_accessibility_rules, which address different Power BI concerns.

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?

It gives explicit when-to-use guidance via bulleted user intents: setting up/adding/configuring RLS roles and DAX table filter expressions, plus testing and validating security rules. It does not name alternatives or exclusion conditions, so it stops short of the top score.

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