Skip to main content
Glama

RLS check: the read-only query

rls_check_query
Read-only

Get a read-only SQL query that inspects RLS state, grants, columns and policies across all public schema tables and views in a Supabase project without reading any row data.

Instructions

Returns a read-only SQL query that lists every table and view in the public schema of a Supabase (Postgres) project with its RLS state, grants to anon/authenticated, column names and policies. It reads no row of data. Run it in the project (SQL Editor, or a Supabase MCP execute_sql tool), then pass the single JSON result cell to rls_check_explain.

Input Schema

NameRequiredDescriptionDefault

No arguments

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.1

TDQS

A4.9/5.0
Behavior5/5

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

Annotations already declare readOnlyHint=true and openWorldHint=false, and the description adds non-obvious behavior the annotations cannot express: this tool emits a query rather than executing it, touches zero rows, and returns a single JSON result cell that must be handed off. That is exactly the extra context the bar asks for when annotations exist.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

Three sentences, each load-bearing: what it returns, what it does not touch, and how to run and hand off the result. The scope detail is front-loaded before the operational instructions.

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?

With no output schema, the description still characterizes the return value (a SQL query text, whose execution yields a single JSON cell) and the downstream consumer. Nothing an agent needs to call this correctly — where to run it, what comes back, where it goes next — is missing.

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?

The input schema is an empty object with zero parameters, so there is nothing for the description to disambiguate and no risk of a caller mis-passing arguments. Baseline 4 applies; no parameter meaning is added or needed.

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 specific verb and artifact ('Returns a read-only SQL query') plus the exact payload it enumerates: every table and view in the public schema with RLS state, anon/authenticated grants, columns, and policies. It is unambiguously distinct from its only sibling, which consumes the output rather than producing it.

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?

Gives concrete execution contexts ('SQL Editor, or a Supabase MCP execute_sql tool') and the explicit next step ('pass the single JSON result cell to rls_check_explain'), which routes the agent through the sibling pair. It also pre-empts a likely misreading by stating it reads no row of data.

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

Deploy Server

Other Tools