Skip to content

list_branches

List branches in a model. Requires at least Viewer role. Use max_results to bound the response size (default 100, max 1000). When the result is truncated, the response includes truncated=true and total_count so you know how many branches exist in total. Pass workspace_id to list branches in a workspace other than your current one (requires an active membership and a grant on the model there; OAuth/JWT sessions only).

read-only · idempotent

NameTypeRequiredDefaultDescription
model_nameAnnotated[str, Field(description='Name of the Bridge Town model.')]Yes
max_resultsAnnotated[int, Field(description='Maximum number of branches to return. Defaults to 100.')]No100
workspace_id`Annotated[strNone, Field(description=WORKSPACE_ID_FIELD_DESCRIPTION)]`NoNone

Returns a structured object. Top-level fields:

  • model (string)
  • branches (array<object>)
  • count (integer)
  • total_count (integer)
  • truncated (boolean)

See the response example below for the full payload shape.

{
"name": "list_branches",
"arguments": {
"model_name": "forecasts"
}
}
{
"model": "forecasts",
"branches": [
{
"name": "main",
"sha": "abc1234def5678901234567890abcdef12345678",
"protected": false
},
{
"name": "scenario/aggressive-growth",
"sha": "0123456789abcdef0123456789abcdef01234567",
"protected": false
}
],
"count": 2,
"total_count": 2,
"truncated": false
}
  • Module: Branches
  • Requires authentication via API token or Auth0 JWT.