Skip to main content
Glama

ShipRely Security Knowledge

Build a Supabase Storage policy

build_storage_policy
Read-onlyIdempotent

Write 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

NameRequiredDescriptionDefault
bucketYesBucket name: lower-case letters, digits, - and _, at most 36 characters.
publicNoPublic bucket: anyone with a file URL can download it (always true for public-read).
actionsNoWhich file operations users may do from the browser.
patternYesowner: each user's own folder. public-read: anyone can download. team: the team's folder. server-only: only the server.
team_columnNoTeam id column on the membership table (team): lower-case letters, digits and _, starting with a letter, at most 40 characters.team_id
members_tableNoMembership table with user_id and the team column (team): lower-case letters, digits and _, starting with a letter, at most 40 characters.team_members

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A3.9/5.0
Behavior4/5

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

Annotations already declare readOnlyHint=true, idempotentHint=true and destructiveHint=false, so the safety profile is covered. The description adds real value beyond them by disclosing the artifacts returned (SQL, check query, tests, upload code, fix prompt) and warning "Every pattern is tested on Postgres; review before running" — which tells the agent the output is generated, not applied, and needs human review.

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?

Three sentences, purpose front-loaded, with the return-contents disclosure and the review caveat in descending order of importance. The pattern enumeration slightly duplicates the schema enum, a minor redundancy rather than a real cost.

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?

No output schema exists, so the description must explain what comes back — and it does, listing the generated SQL, check query, tests, upload code and fix prompt. For a six-parameter generative tool with full schema coverage this is close to complete; only the explicit relationship to build_rls_policy is missing.

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?

Schema description coverage is 100%, including per-enum documentation for pattern, so the schema already carries the parameter meaning. The description's restatement of the four patterns mirrors the enum text rather than adding new semantics such as interactions between public and pattern, so the baseline of 3 applies.

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?

"Write Supabase Storage bucket and storage.objects policies" names a specific verb and a very specific resource, then enumerates the four supported patterns (per-user folders, public read, team folders, server-only). That resource distinction is enough to separate it from the sibling build_rls_policy without opening either schema.

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?

Usage is implied by the resource (you need storage policies), and "review before running" gives a procedural caution. But there is no explicit when-to-use-versus-alternatives guidance, e.g. when to reach for this instead of build_rls_policy or get_security_article; the agent must infer the boundary.

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