delete_branch
Delete a branch from a project. The default branch (main) cannot be deleted. Typically used to clean up scenario branches after merge_branch or merge_pull_request. Requires Owner role. DESTRUCTIVE — defaults to dry_run=True and returns a confirmation_token. To execute: call again with dry_run=False and echo the token.
destructive
Parameters
Section titled “Parameters”| Name | Type | Required | Default | Description |
|---|---|---|---|---|
project_name | Annotated[str, Field(description='Name of the Bridge Town project.')] | Yes | — | |
branch_name | Annotated[str, Field(description='Name for the new branch. Must be a valid git ref name (no spaces, no special chars except hyphens and underscores.')] | Yes | — | |
dry_run | Annotated[bool, Field(description='Preview the deletion without mutating anything.')] | No | True | |
confirmation_token | `Annotated[str | None, Field(description=‘Token required to confirm deletion (returned by a dry run).’)]` | No | None |
Returns
Section titled “Returns”Returns a structured object. Top-level fields:
project(string)branch(string)deleted(boolean)
See the response example below for the full payload shape.
Example
Section titled “Example”Tool Call
Section titled “Tool Call”{ "name": "delete_branch", "arguments": { "project_name": "forecasts", "branch_name": "scenario/aggressive-growth" }}Response
Section titled “Response”{ "project": "forecasts", "branch": "scenario/aggressive-growth", "deleted": true}- Module:
Branches - Requires authentication via API token or Auth0 JWT.