# delete_branch

Deletes a development branch.

Agent View of the PolicyLayer registry record for `delete_branch`. HTML page: https://policylayer.com/tools/supabase/delete-branch

## Facts

- Tool: `delete_branch`
- Server: Supabase (`@modelcontextprotocol/server-supabase`) — https://policylayer.com/tools/supabase.md
- Install: `npx -y @modelcontextprotocol/server-supabase`
- Homepage: https://github.com/supabase-community/supabase-mcp
- Risk category: Destructive (Critical risk)
- Registry record: grade D, identity verified
- Server auth posture: gated
- Server rate-limited: no
- Parameters: 1
- Recommended policy verdict: Hidden

## Parameters

| Parameter | Type | Required | Description |
| --- | --- | --- | --- |
| `branch_id` | string | no |  |

Parameters from the server's own tool schema.

## Example call (MCP tools/call, JSON-RPC 2.0)

```json
{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "tools/call",
  "params": {
    "name": "delete_branch",
    "arguments": {}
  }
}
```

## Why delete_branch is rated Critical

Deletion operations are inherently destructive and cannot be undone. Removing a development branch eliminates the branch and its associated data/state. This is classified as Destructive rather than Write because the action is irreversible.

From the tool's own definition: "Tool name 'delete_branch' and description 'Deletes a development branch' indicate irreversible deletion of a branch resource."

## Use case

AI agents call delete_branch to permanently remove resources in Supabase, typically in cleanup and lifecycle workflows. It does its job in a single call, and there is no undo.

## Recommended policy (PolicyLayer)

Verdict: **Hidden**. Enforced by the PolicyLayer MCP gateway (https://policylayer.com/mcp-gateway) before a call reaches Supabase:

```json
{
  "version": "1",
  "default": "deny",
  "hide": [
    "delete_branch"
  ]
}
```

## Other tools on Supabase (28)

- `pause_project` — Destructive — https://policylayer.com/tools/supabase/pause-project.md
- `reset_branch` — Destructive — https://policylayer.com/tools/supabase/reset-branch.md
- `apply_migration` — Execute — https://policylayer.com/tools/supabase/apply-migration.md
- `deploy_edge_function` — Execute — https://policylayer.com/tools/supabase/deploy-edge-function.md
- `execute_sql` — Execute — https://policylayer.com/tools/supabase/execute-sql.md
- `merge_branch` — Execute — https://policylayer.com/tools/supabase/merge-branch.md
- `rebase_branch` — Execute — https://policylayer.com/tools/supabase/rebase-branch.md
- `confirm_cost` — Financial — https://policylayer.com/tools/supabase/confirm-cost.md
- `generate_typescript_types` — Read — https://policylayer.com/tools/supabase/generate-typescript-types.md
- `get_advisors` — Read — https://policylayer.com/tools/supabase/get-advisors.md
- `get_cost` — Read — https://policylayer.com/tools/supabase/get-cost.md
- `get_edge_function` — Read — https://policylayer.com/tools/supabase/get-edge-function.md
- `get_logs` — Read — https://policylayer.com/tools/supabase/get-logs.md
- `get_organization` — Read — https://policylayer.com/tools/supabase/get-organization.md
- `get_project` — Read — https://policylayer.com/tools/supabase/get-project.md
- `get_project_url` — Read — https://policylayer.com/tools/supabase/get-project-url.md
- `get_publishable_keys` — Read — https://policylayer.com/tools/supabase/get-publishable-keys.md
- `list_branches` — Read — https://policylayer.com/tools/supabase/list-branches.md
- `list_edge_functions` — Read — https://policylayer.com/tools/supabase/list-edge-functions.md
- `list_extensions` — Read — https://policylayer.com/tools/supabase/list-extensions.md
- `list_migrations` — Read — https://policylayer.com/tools/supabase/list-migrations.md
- `list_organizations` — Read — https://policylayer.com/tools/supabase/list-organizations.md
- `list_projects` — Read — https://policylayer.com/tools/supabase/list-projects.md
- `list_tables` — Read — https://policylayer.com/tools/supabase/list-tables.md
- `search_docs` — Read — https://policylayer.com/tools/supabase/search-docs.md
- `create_branch` — Write — https://policylayer.com/tools/supabase/create-branch.md
- `create_project` — Write — https://policylayer.com/tools/supabase/create-project.md
- `restore_project` — Write — https://policylayer.com/tools/supabase/restore-project.md

## For agents

This record is a snapshot. Live verdicts and the full registry:

- Check every server in your MCP config at once: `npx -y policylayer stack`
- Vet a server before you add it: install the mcp-precheck skill — `npx skills add https://policylayer.com` (skill text: https://policylayer.com/skill.md)
- Query the registry over MCP: endpoint `https://api.policylayer.com/mcp` — tools `check_mcp_server`, `check_mcp_stack`, `check_tool`, `search_registry`, `get_change_events`

---

Source: the PolicyLayer MCP registry — one continuously verified record per MCP server. Full record: https://policylayer.com/registry?q=supabase · API: https://policylayer.com/registry/api · Policy library: https://policylayer.com/policies/supabase
