gitlab_list_branches
List all branches in a GitLab repository with latest commit information. Use to check available branches, find feature branches, or filter results by search criteria.
Instructions
List repository branches Returns: All branches with latest commit info Use when: Checking branches, finding feature branches Optional: Search filter
Example response: [{ "name": "main", "protected": true, "merged": false, "can_push": true, "default": true, "commit": { "id": "abc123...", "short_id": "abc123", "title": "Latest commit" } }]
Related tools:
gitlab_create_branch: Create new branch
gitlab_delete_branch: Remove branch
gitlab_compare_refs: Compare branches
Tool call template
This tool declares no required parameters. Add optional parameters from the input schema as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {},
"name": "gitlab_list_branches"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| project_id | No | Project ID or path (optional - auto-detects from git) |