Skip to main content
Glama

Psychevus security tools

Supabase RLS attack simulator

analyze_supabase_rls
Read-onlyIdempotent

Given a Supabase schema (supabase db dump output, migrations, or CREATE TABLE / ALTER TABLE ... ENABLE ROW LEVEL SECURITY / CREATE POLICY / CREATE VIEW / CREATE FUNCTION statements), work out for every table exposed through the Data API and every command whether anyone with the public anon key, any signed-in user, only the row's owner, or nobody can do it, applying PostgreSQL's policy rules. Flags RLS off, using (true), authenticated-only conditions, UPDATE with a weaker WITH CHECK, policies reading user_metadata, views without security_invoker and exposed SECURITY DEFINER functions, each with a SQL fix and an instruction for an AI coding tool. Use it before shipping or after editing policies. Static analysis only: it never connects to a database. Up to about 60 KB of SQL.

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": "analyze_supabase_rls"
  }
}

Input Schema

NameRequiredDescriptionDefault
sqlYesThe schema SQL: tables, RLS statements, policies, views and functions. No data needed.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Added

TDQS

A4.4/5.0
Behavior4/5

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

Annotations already declare readOnly, idempotent, non-destructive, and closed-world, and the description reinforces this rather than contradicting it: 'Static analysis only: it never connects to a database.' It also discloses a real operational limit ('Up to about 60 KB of SQL') and the return shape of findings (each flag paired with a SQL fix and an AI coding tool instruction), which goes beyond the annotations.

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?

The core capability is front-loaded in the first sentence and every clause carries information, but it is a long run-on chain of comma-separated clauses that would scan faster as short sentences or a bulleted list of flags.

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?

For a single-parameter static analyzer with no output schema, the description covers input formats, analysis scope, the specific vulnerability classes flagged, the shape of each finding, the size limit, and the safety profile. An agent has everything needed to select and call it correctly.

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?

Schema coverage is 100% and the schema already says no row data is needed, so the baseline would be 3-4; the description adds genuine meaning by enumerating accepted input forms (db dump output, migrations, or raw CREATE TABLE / ALTER TABLE ... ENABLE ROW LEVEL SECURITY / CREATE POLICY / CREATE VIEW / CREATE FUNCTION statements) and an approximate size ceiling.

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: it derives, per table exposed through the Data API and per command, who (anon key, signed-in user, owner, nobody) can perform it under PostgreSQL policy rules. That is far more specific than the name alone and no sibling tool covers RLS analysis, so it is unambiguous against the listed alternatives.

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?

Gives explicit timing: 'Use it before shipping or after editing policies,' which tells the agent when this is the right call. It does not name a when-not condition or a complementary tool, but no sibling in the list performs comparable analysis, so the guidance is practically sufficient.

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