Skip to main content
Glama

Generate Supabase RLS Policies

briefkit_generate_rls_policies
Read-onlyIdempotent

Generate complete Row Level Security (RLS) policies for Supabase tables and user roles, with SELECT, INSERT, UPDATE, DELETE policies per role, admin overrides, and security notes for server-only tables.

Instructions

Generate complete Row Level Security (RLS) policies for Supabase — SELECT, INSERT, UPDATE, DELETE policies for each table and role combination. Includes security notes and server-only table restrictions.

Args:

  • tables (array of strings): Table names to generate policies for

  • roles (array of strings): User roles in the application

Returns: Complete SQL with RLS enable statements, per-table policies, admin overrides, and security notes. Handles server-only tables (payments, audit_log, webhook_events) automatically.

Examples:

  • "Generate RLS for profiles, orders, payments with Owner and Member roles" -> tables=["profiles", "orders", "payments"], roles=["Owner", "Member"]

  • "RLS policies for a marketplace with Seller and Buyer" -> tables=["profiles", "listings", "orders", "reviews", "payments"], roles=["Owner", "Seller", "Buyer", "Admin"]

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
tablesYesTable names to generate RLS policies for
rolesYesUser roles in the application
Behavior3/5

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

Annotations already indicate readOnly=true, destructive=false, idempotent=true, so the safety profile is clear. The description adds output details but no new behavioral traits like auth needs or side effects, which is acceptable given annotation coverage.

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 well-structured with separate sections for args, returns, and examples. It is informative without being verbose, though minor repetition exists.

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

Completeness5/5

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

Given the tool's simplicity (2 required params, no output schema, annotations present), the description fully explains purpose, parameters, output, and special cases. No critical gaps.

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 100% with descriptions for both parameters. The description adds value by noting automatic handling of server-only tables and providing examples, which aids understanding 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 it generates RLS policies for Supabase with specific SQL operations (SELECT, INSERT, UPDATE, DELETE). The name, title, and sibling tools (database schema, design system) distinguish it well.

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 (generating RLS policies) and includes examples. It does not explicitly exclude alternatives or state when not to use, but the context is sufficient.

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/mithun4elp/briefkit-mcp-server'

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