gitlab_list_branches
List and filter project branches with details like protection status and commit information to manage GitLab repository structure.
Instructions
List branches of a project, optionally filtered by substring.
Includes default, protected and merged flags, and the short id
of the tip commit with its title and date.
Examples:
- "List all branches with 'release' in name" → search='release'
- "Next page of branches" → page=2
- Don't use when you want to check if a specific branch exists by exact name —
use gitlab_get_file on that ref and look at the error instead.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| search | No | Substring match on branch name (case-insensitive). | |
| per_page | No | Items per page (1–100). | |
| page | No | 1-based page number. | |
| project_path | No | GitLab project path (e.g. 'my-org/my-repo'). When omitted, the default from GITLAB_PROJECT_PATH env var is used. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| project | Yes | ||
| count | Yes | ||
| pagination | Yes | ||
| branches | Yes |