Skip to content

list_branches

List branches in a project. 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. Returns: project (str) — project name; branches (list[{name, sha, protected}]) — one entry per branch; count (int) — number of branches returned; total_count (int) — total branches before max_results cap; truncated (bool) — true when results were capped by max_results.

read-only · idempotent

NameTypeRequiredDefaultDescription
project_namestrYes
max_resultsintNo100

Returns a structured object. Top-level fields:

  • project (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": {
"project_name": "forecasts"
}
}
{
"project": "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.