Skip to main content
Glama
larik15

supabase-security-mcp

by larik15

Two-account cross-tenant test

two_account_test

Detect cross-account data leaks in Supabase tables by creating two test users, inserting data as one, and attempting to read, update, and delete as the other via REST API.

Instructions

Creates two temporary users (needs the service role key ONLY for that and for cleanup), inserts a row as user A into each table, then tries to read/update/delete it as user B and as anon through the normal REST API. Reports which tables leak across users. Deletes the test rows and users afterwards. Give sampleRow for tables with required columns.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
urlNo
tablesYes
anonKeyNo
serviceRoleKeyNoservice_role key (or env SUPABASE_SERVICE_ROLE_KEY). Used only to create/delete the two test users and clean up rows.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A3.6/5.0
Behavior5/5

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

With no annotations, the description carries the full burden and does exceptionally well: it discloses that the tool creates temporary users, inserts rows, attempts operations as different roles, reports leaks, and cleans up after itself. This transparency about side effects and cleanup is exemplary.

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 compact and front-loaded with the main action, followed by cleanup and an instructional note. It is slightly repetitive about the service role key, but each sentence earns its place.

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 description thoroughly explains the process and cleanup, but with no output schema it leaves the report format vague ('Reports which tables leak'). It also omits failure behavior, so an agent has to guess the return structure.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters2/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is only 25%, and the description adds little beyond it. It mentions sampleRow and the serviceRoleKey usage, but both are already described in the schema; url, anonKey, and the tables structure remain unexplained at the top level, leaving the low coverage uncompensated.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states a specific verb chain (create users, insert row, test read/update/delete, report leaks) and a specific resource (tables). It does not explicitly compare with sibling tools like probe_anon or security_report, so it stops short of full differentiation.

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

Usage Guidelines3/5

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

The description implies when to use the tool (to test cross-tenant leaks) and gives practical tips (sampleRow for required columns, service role key only for setup/cleanup). However, it does not explicitly mention alternatives or when not to use this tool, leaving some inference required.

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