commit_files
Use commit_files for atomic multi-file changes, especially model plus run.py edits
Parameters
Section titled “Parameters”| Name | Type | Required | Default | Description |
|---|---|---|---|---|
project_name | Annotated[str, Field(description='Name of the Bridge Town project.')] | Yes | — | |
files | Annotated[list[dict[str, Any]], Field(description="List of file operations to commit atomically. Each item must have: path (str, project-relative), content (str), encoding ('text' or 'base64'), and operation ('create', 'update', or 'delete'). For delete operations, content may be omitted.")] | Yes | — | |
commit_message | Annotated[str, Field(description='Git commit message. If omitted, the server generates a default message.')] | Yes | — | |
branch | `Annotated[str | None, Field(description=“Branch to operate on. Defaults to the project’s default branch when omitted or null.”)]` | No | None |
Returns
Section titled “Returns”Returns a structured object. Top-level fields:
project(string)branch(string)commit_sha(string)files_changed(integer)
See the response example below for the full payload shape.
Example
Section titled “Example”Tool Call
Section titled “Tool Call”{ "name": "commit_files", "arguments": { "project_name": "forecasts", "branch": "scenario/actuals-rebase", "commit_message": "feat: update FP&A variance model and run contract", "files": [ { "action": "update", "path": "model/revenue.py", "content": "inputs = ['actuals', 'plan']\noutputs = ['variance_summary']\ndependencies = []\n\nresult = {'variance_summary': [{'month': '2026-03', 'actual': 128000, 'plan': 120000, 'variance': 8000}]}\n", "encoding": "text", "expected_sha": "0123456789abcdef0123456789abcdef01234567" }, { "action": "update", "path": "run.py", "content": "PIPELINE = ['revenue']\n", "encoding": "text", "expected_sha": "fedcba9876543210fedcba9876543210fedcba98" }, { "action": "create", "path": "README.md", "content": "# Revenue variance workflow\n\nRuns forecast versus actuals.\n", "encoding": "text" } ] }}Response
Section titled “Response”{ "project": "forecasts", "branch": "scenario/actuals-rebase", "commit_sha": "abc1234def5678901234567890abcdef12345678", "files_changed": 3}- Module:
Models - Requires authentication via API token or Auth0 JWT.