Skip to main content
Glama

Check Supabase migrations for RLS and grant gaps

check_supabase_migrations
Read-onlyIdempotent

check_supabase_migrations({"sql":"create table public.notes (id bigint);"}) Use when reviewing Supabase migration changes for missing RLS or policies, unrestricted read/write policies, exposed security definer functions and Data API grant gaps. Pass file contents: sql contains one migration's SQL text; files contains path and content for each file. Runs the VibeRaven 1.8.0 SQL rules and returns finding id, severity, file, line, a suggested fix and a guide link. For missing Data API grants, include the migration revoking default privileges or supabase/config.toml, plus browser files using supabase.from(...) (a "use client" file, or src files with package.json for Vite). Limits: supplied text only, up to 200 KB/50 files; cannot access your repository or database, does not execute SQL, and does not store or log file contents.

Input Schema

NameRequiredDescriptionDefault
sqlNoThe SQL text of one migration file.
filesNoSeveral files: .sql migrations, and optionally supabase/config.toml, package.json and browser code files.

Output Schema

NameRequiredDescriptionDefault
scopeYes
countsYes
skippedYes
findingsYes
nextStepNo
sql_filesYes
full_checkYes
public_tablesYes
viberaven_versionYes
findings_not_listedYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changed
    • addedOutput schema / properties / nextStep / properties / codingAgentTask
      Added value: +{
      +  "type": "string"
      +}
  2. Changed5 schema fields changed
    • addedOutput schema / properties / counts / properties / needs_runtime_check
      Added value: +{
      +  "type": "integer"
      +}
    • changedOutput schema / properties / counts / required
      Previous value: -[
      -  "critical",
      -  "high",
      -  "warning",
      -  "info"
      -]New value: +[
      +  "critical",
      +  "high",
      +  "warning",
      +  "info",
      +  "needs_runtime_check"
      +]
    • changedOutput schema / properties / findings / items / properties / id / enum
      Previous value: -[
      -  "rls_disabled",
      -  "rls_no_policies",
      -  "rls_policy_allows_all_read",
      -  "rls_policy_allows_all_write",
      -  "security_definer_function_executable",
      -  "data_api_grant_without_rls",
      -  "data_api_grant_missing"
      -]New value: +[
      +  "sql_needs_runtime_check",
      +  "rls_disabled",
      +  "rls_no_policies",
      +  "rls_policy_allows_all_read",
      +  "rls_policy_allows_all_write",
      +  "security_definer_function_executable",
      +  "data_api_grant_without_rls",
      +  "data_api_grant_missing"
      +]
    • changedOutput schema / properties / findings / items / properties / severity / enum
      Previous value: -[
      -  "critical",
      -  "high",
      -  "warning",
      -  "info"
      -]New value: +[
      +  "critical",
      +  "high",
      +  "warning",
      +  "info",
      +  "needs_runtime_check"
      +]
    • addedOutput schema / properties / findings / items / properties / verifyCommand
      Added value: +{
      +  "type": "string"
      +}
  3. Changed1 schema field changed
    • addedOutput schema / properties / nextStep
      Added value: +{
      +  "additionalProperties": false,
      +  "properties": {
      +    "label": {
      +      "type": "string"
      +    },
      +    "url": {
      +      "type": "string"
      +    }
      +  },
      +  "required": [
      +    "label",
      +    "url"
      +  ],
      +  "type": "object"
      +}
  4. Changed1 schema field changed
    • addedInput schema / oneOf
      Added value: +[
      +  {
      +    "required": [
      +      "sql"
      +    ]
      +  },
      +  {
      +    "required": [
      +      "files"
      +    ]
      +  }
      +]
  5. Added

TDQS

A4.5/5.0
Behavior5/5

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

Annotations already declare readOnlyHint, idempotentHint, destructiveHint=false and openWorldHint=false, but the description adds substantive context beyond them: the rule engine version (VibeRaven 1.8.0), the exact limits (200 KB / 50 files), and the negative guarantees that matter most for a security tool — no repo or database access, no SQL execution, no storage or logging of file contents.

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 a concrete example call and the use case, then a dense but purposeful paragraph covering inputs, output and limits. The embedded JSON snippet is slightly awkward as an opening, but nearly every sentence carries information an agent needs.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness4/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

An output schema exists, so return values needn't be explained in detail, and the description still names the returned fields (finding id, severity, file, line, fix, guide link). Limits and non-capabilities are fully covered; the only omission is that an agent is never told it must choose between sql and files rather than supplying both.

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%, so the baseline is 3, but the description adds genuine meaning: sql is one migration's SQL text, files carries path+content, and it explains the analysis purpose behind the optional config.toml/package.json/browser-file inputs. It does not clarify that sql and files are mutually exclusive under the schema's oneOf, which is the remaining gap.

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 resource: checking Supabase migration SQL for missing RLS, permissive policies, security-definer exposure and Data API grant gaps. The scope is narrow and concrete, and an agent can tell it apart from siblings like check_github_repo or search_guides without opening any schema.

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 an explicit trigger ("Use when reviewing Supabase migration changes...") and detailed input recipes, e.g. for missing Data API grants include the revoking migration or supabase/config.toml plus browser files using supabase.from(...). It stops short of naming a sibling alternative or stating when NOT to use this tool, so it falls just short of the top score.

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.