Skip to main content
Glama

security_supabase_rls_check

Read-only

Supabase RLS / Postgres Policy Audit — Offline audit of Supabase/Postgres migration SQL for row level security holes: public-schema tables without ENABLE ROW LEVEL SECURITY (readable/writable with the anon key), DISABLE RLS, policies USING/WITH CHECK (true) for anon/public or authenticated, auth.role()-only checks, user_metadata trust, UPDATE policies without WITH CHECK, views that bypass RLS (no security_invoker), SECURITY DEFINER functions without search_path or exposed in public, GRANTs of write privileges to anon. Returns a per-table RLS/policy map, findings with fixes, score, grade and verdict OK/REVIEW/INSECURE. Param sql= (aliases text=, migration=). Price: $0.005 USDC (Base, via x402).

Tool call template

Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {
      "sql": "<sql>"
    },
    "name": "security_supabase_rls_check"
  }
}

Input Schema

NameRequiredDescriptionDefault
sqlYese.g. create table public.profiles (id uuid primary key, user_id uuid, bio text); create policy read_all on public.profiles for select using (true);

Schema Changelog

Changes observed during successful MCP inspections.

  1. Added

TDQS

A4.2/5.0
Behavior4/5

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

Annotations already declare readOnlyHint=true, destructiveHint=false and openWorldHint=true, so safety is covered; the description adds real context beyond that by disclosing the output shape (per-table RLS map, findings with fixes, score, grade, verdict) and that this is a paid call ($0.005 USDC via x402). It also signals the analysis is offline, which matters for an agent expecting live database inspection. Minor tension with openWorldHint=true is not a contradiction, since the open-world trait refers to the breadth of SQL constructs handled, not network calls.

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?

Front-loaded with purpose in the first clause, then a dense enumeration of checks and finally return values and pricing — a sensible order for an agent scanning for relevance. The check list is long and compressed into a single run-on clause, which is heavy but each item earns its place as a distinct audit category.

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?

No output schema exists, yet the description fully specifies the return payload (per-table RLS/policy map, findings with fixes, score, grade, OK/REVIEW/INSECURE verdict), plus cost and payment rail. For a single-parameter static analyzer, nothing an agent needs in order to call it or interpret the result is missing.

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 100% and there is a single required 'sql' string with an inline example, so the schema already carries the burden. The description adds one genuinely new fact, the aliases text= and migration=, but gives no guidance on size limits, multi-statement handling, or dialect assumptions, so the baseline 3 is appropriate.

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?

States a concrete verb and resource ('Offline audit of Supabase/Postgres migration SQL for row level security holes') and then enumerates the specific hole classes it detects (missing ENABLE ROW LEVEL SECURITY, using(true) policies, user_metadata trust, missing security_invoker, SECURITY DEFINER search_path). An agent can distinguish this from sibling security_* scanners purely from the description, since the audited artifact (migration SQL) is named explicitly.

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?

Makes clear the tool consumes migration SQL text and is an offline static audit, which implicitly tells the agent it must supply DDL/policy SQL rather than live database credentials. It does not state exclusions or name alternatives, but the resource-specific framing leaves little ambiguity about when this scanner applies versus the nginx/k8s/IAM siblings.

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

Try in Browser

Glama MCP Gateway

Add one secure layer between your agents and this server.

Resources