Skip to content

commit_files

Use commit_files for atomic multi-file changes, especially model plus run.py edits

NameTypeRequiredDefaultDescription
project_nameAnnotated[str, Field(description='Name of the Bridge Town project.')]Yes
filesAnnotated[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_messageAnnotated[str, Field(description='Git commit message. If omitted, the server generates a default message.')]Yes
branch`Annotated[strNone, Field(description=“Branch to operate on. Defaults to the project’s default branch when omitted or null.”)]`NoNone

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.

{
"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"
}
]
}
}
{
"project": "forecasts",
"branch": "scenario/actuals-rebase",
"commit_sha": "abc1234def5678901234567890abcdef12345678",
"files_changed": 3
}
  • Module: Models
  • Requires authentication via API token or Auth0 JWT.