Skip to main content
Glama

run_dax_as_role

Run a DAX query as a security role to get row-level filtered rows, with optional effective user for dynamic RLS, validating roles to avoid unfiltered access. Read-only.

Instructions

Run a DAX query AS a security role: opens a second connection to the session's engine with Roles= (and optionally EffectiveUserName= for dynamic USERPRINCIPALNAME-driven RLS) so the engine applies the role's row-level filters, and returns the rows. Role names are validated against the model so a typo can never silently run unfiltered. Read-only.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
queryYesthe DAX query (bare table expressions get EVALUATE prefixed)
rolesYesrole names, comma-separated (all applied together, as AS unions role filters)
maxRowsNomax rows to return (default 200)
sessionIdYes
effectiveUserNameNoimpersonated UPN for dynamic RLS, e.g. user@contoso.com (optional)
Behavior4/5

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

With no annotations, the description carries the full burden and does well: it discloses the second-connection mechanism, role validation, and read-only nature. It adds safety-critical context (typos can't silently run unfiltered) that goes beyond typical descriptions, though it doesn't cover every edge case.

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?

Three sentences, front-loaded with the core action, and no wasted words. Each sentence adds value: purpose, mechanism, and safety guarantee.

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?

Despite no output schema and no annotations, the description is reasonably complete: it explains purpose, behavior, and safety guarantees, and notes that it returns rows. It could mention result format or explicitly compare to run_dax, but the core context is solid.

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

Parameters3/5

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

Schema description coverage is 80%, so the baseline is 3. The description reinforces what the schema already says (roles comma-separated, EVALUATE prefix, effectiveUserName for dynamic RLS) but does not add significant new parameter meaning beyond the schema.

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 clearly states 'Run a DAX query AS a security role' with a specific verb, resource, and scope. It distinguishes itself from plain run_dax by explicitly mentioning role-based row-level filters, making the tool's unique purpose unmistakable.

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?

The description provides clear context for when to use the tool: when you need the engine to apply role-based RLS. However, it does not explicitly name alternative tools (e.g., run_dax) or state when not to use this tool, so it stops short of full exclusions.

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