supabase-mcp icon indicating copy to clipboard operation
supabase-mcp copied to clipboard

feat: cost confirmation flows

Open gregnr opened this issue 10 months ago • 0 comments

We need to be crystal clear on which tools incur additional costs and we need users to confirm their understanding before running them. To do this we add two new tools:

  • get_cost
  • confirm_cost

Flow

  1. The LLM calls get_cost to understand the cost of a new project or new branch (this will depend on the org plan and how many existing projects are in that org).

    The rules for new projects are:

    • Free org: cost will be $0/month (if the user reaches their 2 project limit, create_project will return an error)
    • Paid org with 0 projects: cost will be $0/month since the first project is included
    • Paid org with >0 projects: cost will be $10/month

    For new branches, cost is always $0.01344 / hour

  2. The the LLM shares this information with the user, then calls confirm_cost which the user can choose to run.

  3. confirm_cost returns a confirmation ID that is passed to create_project or create_branch. Both create_project or create_branch require a confirm_cost_id and will not run without them.

gregnr avatar Apr 04 '25 21:04 gregnr