delete_file
Delete a file from a Bridge Town project. The path is project-relative (e.g. ‘README.md’, ‘model/revenue.py’, ‘data/seed.csv’, ‘assets/logo.png’). Specify branch to delete from a non-default branch (e.g. a scenario branch). Defaults to the project’s default branch when branch is omitted. Pass expected_sha (the sha returned by read_file) to enable optimistic concurrency control: if another session modified the file since you last read it the tool raises a ToolError with the current SHA. Requires at least Editor access to the project. Returns: path (str) — deleted file path; project (str) — project name; deleted (bool) — always true on success.
destructive
Parameters
Section titled “Parameters”| Name | Type | Required | Default | Description |
|---|---|---|---|---|
project_name | str | Yes | — | |
path | str | Yes | — | |
commit_message | str | No | '' | |
branch | str | No | '' | |
expected_sha | str | No | '' |
Returns
Section titled “Returns”Returns a structured object. Top-level fields:
path(string)project(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_file", "arguments": { "project_name": "forecasts", "path": "model/revenue.py", "commit_message": "chore: drop deprecated revenue model" }}Response
Section titled “Response”{ "path": "model/revenue.py", "project": "forecasts", "deleted": true}- Module:
Models - Requires authentication via API token or Auth0 JWT.