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.
Tool call template
This tool declares no required parameters. Add optional parameters from the input schema as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {},
"name": "pg_list_policies"
}
}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 |