List Row Level Security Policies
pg_list_policiesList all Row-Level Security (RLS) policies in a PostgreSQL schema, including USING and WITH CHECK expressions. Also shows tables with RLS enabled even if no policies exist.
Instructions
List all Row Level Security (RLS) policies in a schema, including USING and WITH CHECK expressions.
Args:
schema: Schema name (default: public)
table: Filter to a specific table (optional)
response_format: Output format
Returns: JSON: { policies: PolicyInfo[], count: number, rls_enabled_tables: string[] } Markdown: policy table with name, command, roles, permissive flag, and filter expressions
Note: Also shows which tables have RLS enabled even if no policies are defined.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| schema | No | PostgreSQL schema name (default: public) | public |
| table | No | Filter to a specific table (optional) | |
| response_format | No | Output format: 'markdown' for human-readable, 'json' for machine-readable | markdown |