Skip to main content
Glama

Deadbolt

Check who can read and write Supabase tables (RLS, policies, grants)

deadbolt_check_supabase_access
Read-onlyIdempotent

Use when you write, review or are about to apply Supabase / PostgreSQL migration SQL (CREATE TABLE, RLS, CREATE POLICY, GRANT, views, SECURITY DEFINER functions, storage buckets), or when a user asks whether their Supabase data is exposed, whether RLS is set up right, or why a query returns 42501 permission denied or no rows. Replays the SQL with real Postgres rules and returns, per table, what signed-out (anon) and signed-in (authenticated) users can SELECT/INSERT/UPDATE/DELETE (all rows, own rows, some rows, none, or denied for a missing grant), plus findings with severity and ready-to-run fix SQL: RLS off, policies written but RLS never enabled, using(true) writes, personal columns readable by anyone, views that bypass RLS, SECURITY DEFINER functions anyone can call, user_metadata in policies, public bucket listing, grants missing after the Oct 30 2026 default change. Also accepts the JSON produced by deadbolt_catalog_query for the live database. Deterministic; never connects to any database. Run it before telling a user their schema is safe. Up to 200,000 characters.

Input Schema

NameRequiredDescriptionDefault
sqlYesMigration SQL (one or many files concatenated, in order), or the single JSON value returned by the catalog query.
project_created_before_2026_10_30NoOnly for SQL input. true (default): the project grants new public tables to anon and authenticated automatically (projects created before Oct 30, 2026). false: new tables get no grants unless the SQL grants them (projects created on or after Oct 30, 2026).

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A4.6/5.0
Behavior5/5

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

Beyond the annotations (readOnly, idempotent, closed-world, non-destructive), it discloses the crucial behavioral facts: it is deterministic, never connects to any database, and enforces a 200,000-character input cap. It also enumerates the shape of the result (per-table anon/authenticated SELECT/INSERT/UPDATE/DELETE verdicts plus severity-ranked findings with fix SQL), which the annotations cannot convey.

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?

It is front-loaded with the triggering condition and organized around a single dense paragraph, with no filler sentences. The long enumeration of finding types and the parenthetical SQL keyword list make it heavier than necessary, but each element carries real information an agent would use.

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?

There is no output schema, yet the description fully compensates by describing the per-table verdict matrix and the severity/fix-SQL findings. For a nontrivial static-analysis tool, the agent has enough to decide to call it, choose the input form, and interpret what comes back.

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%, so both parameters are already fully documented in the input schema, including the two accepted input forms and the before/after Oct 30 2026 grant semantics. The description only echoes those forms and supplies the motivating context for the date flag, so it meets but does not exceed the baseline for a fully documented 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 names a specific verb-and-resource pair: replaying Supabase/PostgreSQL migration SQL against real Postgres rules to determine per-table read/write access. It is clearly separable from the sibling deadbolt_catalog_query, which it explicitly consumes output from, and from unrelated siblings like doorman_check_robots_txt.

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

Usage Guidelines5/5

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

It states exactly when to reach for it (writing/reviewing/applying migration SQL, user asking if data is exposed, diagnosing 42501 or empty results) and gives an explicit imperative: 'Run it before telling a user their schema is safe.' It also names the alternative input path (JSON from deadbolt_catalog_query) so the agent knows it need not re-run the catalog query.

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