Build a Supabase Storage policy
build_storage_policyWrite Supabase Storage bucket and storage.objects policies: per-user folders, public read, team folders or server-only. Returns the SQL, a check query, tests, upload code and a fix prompt. Every pattern is tested on Postgres; review before running.
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": {
"bucket": "<bucket>",
"pattern": "<pattern>"
},
"name": "build_storage_policy"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| bucket | Yes | Bucket name: lower-case letters, digits, - and _, at most 36 characters. | |
| public | No | Public bucket: anyone with a file URL can download it (always true for public-read). | |
| actions | No | Which file operations users may do from the browser. | |
| pattern | Yes | owner: each user's own folder. public-read: anyone can download. team: the team's folder. server-only: only the server. | |
| team_column | No | Team id column on the membership table (team): lower-case letters, digits and _, starting with a letter, at most 40 characters. | team_id |
| members_table | No | Membership table with user_id and the team column (team): lower-case letters, digits and _, starting with a letter, at most 40 characters. | team_members |