Skip to main content
Glama

set_rls

Set or update row-level security (RLS) filters for roles on tables using DAX boolean expressions, restricting rows to those that return true. Creates missing table permissions automatically.

Instructions

Set or update the row-level security (RLS) filter for a role on a table. The DAX boolean expression keeps only the rows it returns true for, e.g. "[Region] = USERPRINCIPALNAME()" or "'Sales'[Country] = "NZ"". Creates the table permission if absent.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
roleYesrole name (create with add_role first)
tableYestable the filter applies to
sessionIdYes
daxFilterExpressionYesDAX boolean filter expression
Behavior4/5

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

With no annotations provided, the description carries the full burden and does well by disclosing that the tool is an upsert ('set or update'), that the DAX expression keeps only rows returning true, and that it creates the table permission if absent. It does not mention authentication requirements or reversibility, but the key side effects are transparent.

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

Conciseness5/5

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

The description is two sentences with a concise definition and an illustrative example. Every sentence contributes purpose, behavior, and context without unnecessary fluff.

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?

Given there is no output schema or annotations, the description adequately covers the purpose, the DAX filter semantics, and the side effect of creating permissions. It does not mention prerequisites beyond the role existing (noted in schema) or what happens to an existing filter, but for a focused setter tool, the core context is provided.

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 75%, and the description adds meaningful semantics by explaining how the daxFilterExpression behaves ('keeps only the rows it returns true for') and providing concrete examples. This goes beyond the schema descriptions, which only label the parameters, though sessionId remains undocumented in both schema and description.

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

Purpose4/5

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

The description clearly states the tool 'Set or update the row-level security (RLS) filter for a role on a table,' identifying the specific verb, target resource, and context. It differentiates from siblings like add_role or set_role_permission by focusing on the RLS filter and the filtering semantics, though it does not explicitly name alternatives.

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

Usage Guidelines3/5

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

The description implies usage by stating what the tool does and mentions it creates the table permission if absent, but it does not explicitly say when to use it versus alternatives such as add_dynamic_rls or set_role_permission. It offers context but no exclusions or when-not-to-use guidance.

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

Install Server

Other Tools

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/cyphonica/powerbi-pbix-mcp'

If you have feedback or need assistance with the MCP directory API, please join our Discord server