Skip to main content
Glama

setup_rls_and_roles

Apply RLS roles and members to a TMDL model, validate the role spec, write role definitions, and run test queries with rollback on failure.

Instructions

Apply RLS roles + members + run a test matrix against a TMDL model.

Validates the role spec, writes role <Name> blocks into definition.tmdl (atomic), and runs each test_query through the (injected) test_engine callable. Failures can roll back edits when rollback_on_test_failure is True.

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. First observedv0.1.0

TDQS

B3.2/5.0
Behavior3/5

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

With no annotations, the description must carry the full burden. It discloses that edits are written atomically to definition.tmdl and that failures can roll back when rollback_on_test_failure is True. However, it omits details about permissions, side effects on the model, or success behavior, making the transparency partial.

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 two sentences, front-loaded with the primary action, and uses precise terminology. It is concise and well-structured, though it assumes familiarity with TMDL and test engines.

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

Completeness2/5

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

Given the tool's complexity (5 parameters, no schema descriptions, no annotations), the description is incomplete. It does not explain how to provide the spec, what dry_run does, or what the output schema contains, leaving significant gaps for correct invocation.

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

Parameters2/5

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

Schema description coverage is 0%, so the description must compensate. It only mentions rollback_on_test_failure and test_query indirectly, but fails to explain target, spec_json, spec_yaml, or dry_run. This leaves the agent without adequate parameter meaning.

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 the tool applies RLS roles and members and runs a test matrix against a TMDL model, with specific actions like writing role blocks and validating the spec. This is a specific verb+resource statement that distinguishes it from siblings like deploy or refresh, which have different purposes.

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

Usage Guidelines2/5

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

The description provides no guidance on when to use this tool versus alternatives, nor any exclusions or prerequisites. It does not mention related tools or conditions that would make this the right choice, leaving the agent to infer its applicability.

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