Skip to main content
Glama

Check Supabase migrations

check_supabase_migrations

Cross-user Supabase row leak? Review authorized, redacted pasted SQL (sql) or files for RLS and Data API grants. Public URL: check_github_repo. No source: ask for it. File/line findings and a browser recheck link. Supported write repairs include corrected_sql and race_spec for race_two_users.

Input Schema

NameRequiredDescriptionDefault
sqlNoAuthorized, redacted SQL text of one migration. Use files if earlier migrations define relevant policies or grants.
urlNoGitHub repository: https://github.com/owner/name, github.com/owner/name or owner/name.
repoNoGitHub repository: https://github.com/owner/name, github.com/owner/name or owner/name.
filesNoSeveral files: .sql migrations, and optionally supabase/config.toml, package.json and browser code files.
github_urlNoGitHub repository: https://github.com/owner/name, github.com/owner/name or owner/name.

Output Schema

NameRequiredDescriptionDefault
scopeNo
countsNo
skippedNo
findingsNo
nextStepNo
reportUrlNo
sql_filesNo
full_checkNo
check_actionNo
corrected_sqlNo
public_tablesNo
access_summaryNo
input_requiredNo
race_next_stepNo
user_next_stepNo
nothing_checkedNo
viberaven_versionNo
findings_not_listedNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changed
    • changedOutput schema / oneOf
      Previous value: -[
      -  {
      -    "not": {
      -      "required": [
      -        "input_required"
      -      ]
      -    },
      -    "required": [
      -      "viberaven_version",
      -      "scope",
      -      "sql_files",
      -      "public_tables",
      -      "counts",
      -      "findings",
      -      "findings_not_listed",
      -      "skipped",
      -      "full_check"
      -    ]
      -  },
      -  {
      -    "required": [
      -      "input_required"
      -    ]
      -  }
      -]New value: +[
      +  {
      +    "not": {
      +      "required": [
      +        "input_required"
      +      ]
      +    },
      +    "required": [
      +      "viberaven_version",
      +      "scope",
      +      "sql_files",
      +      "public_tables",
      +      "counts",
      +      "findings",
      +      "findings_not_listed",
      +      "skipped"
      +    ]
      +  },
      +  {
      +    "required": [
      +      "input_required"
      +    ]
      +  }
      +]
  2. Changed1 schema field changed
    • addedOutput schema / properties / check_action
      Added value: +{
      +  "additionalProperties": false,
      +  "properties": {
      +    "label": {
      +      "type": "string"
      +    },
      +    "url": {
      +      "format": "uri",
      +      "type": "string"
      +    }
      +  },
      +  "required": [
      +    "label",
      +    "url"
      +  ],
      +  "type": "object"
      +}
  3. Changed1 schema field changed
    • changedInput schema / properties / sql / description
      Previous value: -"The SQL text of one migration file."New value: +"Authorized, redacted SQL text of one migration. Use files if earlier migrations define relevant policies or grants."
  4. Changed7 schema fields changed
    • changedInput schema / oneOf
      Previous value: -[
      -  {
      -    "required": [
      -      "sql"
      -    ]
      -  },
      -  {
      -    "required": [
      -      "files"
      -    ]
      -  }
      -]New value: +[
      +  {
      +    "required": [
      +      "sql"
      +    ]
      +  },
      +  {
      +    "required": [
      +      "files"
      +    ]
      +  },
      +  {
      +    "not": {
      +      "anyOf": [
      +        {
      +          "required": [
      +            "sql"
      +          ]
      +        },
      +        {
      +          "required": [
      +            "files"
      +          ]
      +        }
      +      ]
      +    }
      +  }
      +]
    • addedInput schema / properties / github_url
      Added value: +{
      +  "description": "GitHub repository: https://github.com/owner/name, github.com/owner/name or owner/name.",
      +  "maxLength": 300,
      +  "minLength": 3,
      +  "type": "string"
      +}
    • addedInput schema / properties / repo
      Added value: +{
      +  "description": "GitHub repository: https://github.com/owner/name, github.com/owner/name or owner/name.",
      +  "maxLength": 300,
      +  "minLength": 3,
      +  "type": "string"
      +}
    • addedInput schema / properties / url
      Added value: +{
      +  "description": "GitHub repository: https://github.com/owner/name, github.com/owner/name or owner/name.",
      +  "maxLength": 300,
      +  "minLength": 3,
      +  "type": "string"
      +}
    • addedOutput schema / oneOf
      Added value: +[
      +  {
      +    "not": {
      +      "required": [
      +        "input_required"
      +      ]
      +    },
      +    "required": [
      +      "viberaven_version",
      +      "scope",
      +      "sql_files",
      +      "public_tables",
      +      "counts",
      +      "findings",
      +      "findings_not_listed",
      +      "skipped",
      +      "full_check"
      +    ]
      +  },
      +  {
      +    "required": [
      +      "input_required"
      +    ]
      +  }
      +]
    • addedOutput schema / properties / input_required
      Added value: +{
      +  "additionalProperties": false,
      +  "properties": {
      +    "example": {
      +      "additionalProperties": false,
      +      "properties": {
      +        "arguments": {
      +          "type": "object"
      +        },
      +        "name": {
      +          "type": "string"
      +        }
      +      },
      +      "required": [
      +        "name",
      +        "arguments"
      +      ],
      +      "type": "object"
      +    },
      +    "field": {
      +      "type": "string"
      +    },
      +    "message": {
      +      "type": "string"
      +    },
      +    "next_step": {
      +      "type": "string"
      +    }
      +  },
      +  "required": [
      +    "field",
      +    "message",
      +    "example",
      +    "next_step"
      +  ],
      +  "type": "object"
      +}
    • removedOutput schema / required
      Removed value: -[
      -  "viberaven_version",
      -  "scope",
      -  "sql_files",
      -  "public_tables",
      -  "counts",
      -  "findings",
      -  "findings_not_listed",
      -  "skipped",
      -  "full_check"
      -]
  5. Changed3 schema fields changed
    • addedOutput schema / properties / nothing_checked
      Added value: +{
      +  "type": "boolean"
      +}
    • addedOutput schema / properties / reportUrl
      Added value: +{
      +  "format": "uri",
      +  "type": "string"
      +}
    • addedOutput schema / properties / user_next_step
      Added value: +{
      +  "type": "string"
      +}
  6. Changed8 schema fields changed
    • addedOutput schema / properties / access_summary
      Added value: +{
      +  "items": {
      +    "properties": {
      +      "file": {
      +        "type": "string"
      +      },
      +      "grants": {
      +        "items": {
      +          "type": "string"
      +        },
      +        "type": "array"
      +      },
      +      "line": {
      +        "type": "integer"
      +      },
      +      "policies": {
      +        "items": {
      +          "type": "string"
      +        },
      +        "type": "array"
      +      },
      +      "rls": {
      +        "type": "boolean"
      +      },
      +      "table": {
      +        "type": "string"
      +      }
      +    },
      +    "type": "object"
      +  },
      +  "maxItems": 8,
      +  "type": "array"
      +}
    • addedOutput schema / properties / nextStep / oneOf
      Added value: +[
      +  {
      +    "required": [
      +      "command"
      +    ]
      +  },
      +  {
      +    "required": [
      +      "tool"
      +    ]
      +  }
      +]
    • addedOutput schema / properties / nextStep / properties / arguments
      Added value: +{
      +  "type": "object"
      +}
    • removedOutput schema / properties / nextStep / properties / codingAgentTask
      Removed value: -{
      -  "type": "string"
      -}
    • addedOutput schema / properties / nextStep / properties / command
      Added value: +{
      +  "type": "string"
      +}
    • addedOutput schema / properties / nextStep / properties / tool
      Added value: +{
      +  "type": "string"
      +}
    • removedOutput schema / properties / nextStep / properties / url
      Removed value: -{
      -  "type": "string"
      -}
    • changedOutput schema / properties / nextStep / required
      Previous value: -[
      -  "label",
      -  "url"
      -]New value: +[
      +  "label"
      +]
  7. Changed5 schema fields changed
    • addedOutput schema / properties / corrected_sql
      Added value: +{
      +  "type": "string"
      +}
    • changedOutput schema / properties / findings / items / properties / id / enum
      Previous 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"
      -]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",
      +  "concurrent_counter",
      +  "concurrent_credits",
      +  "concurrent_booking",
      +  "concurrent_invite",
      +  "concurrent_unique_owner"
      +]
    • addedOutput schema / properties / findings / items / properties / race_spec
      Added value: +{
      +  "additionalProperties": false,
      +  "properties": {
      +    "family": {
      +      "enum": [
      +        "counter",
      +        "credits",
      +        "booking",
      +        "invite",
      +        "unique_owner"
      +      ],
      +      "type": "string"
      +    },
      +    "format": {
      +      "const": "migration-fix-v1",
      +      "type": "string"
      +    },
      +    "operation": {
      +      "maxLength": 70,
      +      "type": "string"
      +    },
      +    "source_sha256": {
      +      "pattern": "^[a-f0-9]{64}$",
      +      "type": "string"
      +    },
      +    "table": {
      +      "maxLength": 70,
      +      "type": "string"
      +    }
      +  },
      +  "required": [
      +    "format",
      +    "family",
      +    "table",
      +    "source_sha256"
      +  ],
      +  "type": "object"
      +}
    • changedOutput schema / properties / findings / items / required
      Previous value: -[
      -  "id",
      -  "severity",
      -  "message",
      -  "fix",
      -  "guide_url"
      -]New value: +[
      +  "id",
      +  "severity",
      +  "message",
      +  "fix"
      +]
    • addedOutput schema / properties / race_next_step
      Added value: +{
      +  "type": "string"
      +}
  8. Changed1 schema field changed
    • addedOutput schema / properties / nextStep / properties / codingAgentTask
      Added value: +{
      +  "type": "string"
      +}
  9. 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"
      +}
  10. Changed1 schema field changed
    • addedOutput schema / properties / nextStep
      Added value: +{
      +  "additionalProperties": false,
      +  "properties": {
      +    "label": {
      +      "type": "string"
      +    },
      +    "url": {
      +      "type": "string"
      +    }
      +  },
      +  "required": [
      +    "label",
      +    "url"
      +  ],
      +  "type": "object"
      +}
  11. Changed1 schema field changed
    • addedInput schema / oneOf
      Added value: +[
      +  {
      +    "required": [
      +      "sql"
      +    ]
      +  },
      +  {
      +    "required": [
      +      "files"
      +    ]
      +  }
      +]
  12. Added

TDQS

A3.8/5.0
Behavior3/5

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

Beyond the annotations, it states that output includes file/line findings, a browser recheck link, and supported write repairs such as corrected_sql and race_spec. However, it never clarifies side effects or permissions, and readOnlyHint=false is left unexplained, so behavioral disclosure remains partial.

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 description is short and front-loads the user problem and main inputs, with no obvious filler. Its telegraphic fragments and the unexplained repair sentence reduce clarity slightly, so it is concise but not fully polished.

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

Completeness3/5

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

The existence of an output schema and full parameter descriptions means the description need not restate return values. Still, it leaves ambiguity around the url/repo/github_url parameters and the schema branch allowing neither sql nor files, so it is not fully complete for a five-parameter tool.

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?

All five parameters have schema descriptions, so the schema carries parameter meaning. The description mentions sql and files and routes public URLs elsewhere, but it does not add much about url, repo, or github_url; baseline 3 is appropriate at 100% coverage.

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 security-review task: reviewing authorized, redacted SQL (sql) or files for RLS and Data API grants to catch cross-user Supabase row leaks. It explicitly points public-URL cases to check_github_repo, so the resource and scope are distinguishable from that sibling.

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?

It gives a concrete routing rule for public URLs ("Public URL: check_github_repo") and says to ask for source when none is supplied. It does not spell out when to choose sql versus files, though the schema covers that choice; overall guidance is present but not exhaustive.

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.