Action domain

branch

Every action this domain exposes through gitlab_execute_action, from the gitlab://tools manifest. Each entry folds out to its full upstream description and required parameters.

11 · actions3 · destructive5 · read-only

Counted against gitlab.com, which is the only host this endpoint talks to, with a token it resolves to the Ultimate tier: to use it against a self-managed instance, run the server yourself — its documentation covers that. The catalog is scoped to the token that asks, so the count moves with both its tier and its permissions: a Free token sees fewer actions, a member of a group on a paid plan sees that plan's, and administration domains only appear to tokens allowed to use them. That is why the figures differ elsewhere: the upstream project counts 872 operations on Community Edition and up to 1,099 on GitLab.com's top tier, while this deployment publishes 980 because it is OAuth-only and acts with your token, so the administration domains a non-admin account cannot call never appear. All three describe the same catalog, counted from three vantage points.

Each entry also says what a GitLab fine-grained personal access token needs to run it, as GitLab 19.6.1 declares it: every permission of one line, at one of the boundaries named. Where there are alternatives, any one is enough. What follows "Some calls also need" is needed only by the calls that send that request, and the parts of the answer GitLab serves empty to such a token are listed apart.

Back to the server card

  1. branch.create

    Branch Create

    Create a branch from a source ref (branch, tag, or commit SHA). Returns: the created branch with its head commit object, protection and default flags, and web URL. See also: branch.list, merge_request.create, repository.compare.

    Required parameters: branch_name (string), project_id (string|integer), ref (string)

    Fine-grained token: Branch: Create at project

  2. branch.delete

    Branch Deletedestructive

    Delete a single branch by name. Returns: a success confirmation. Fails for protected or default branches. See also: branch.list, branch.unprotect.

    Required parameters: branch_name (string), project_id (string|integer)

    Fine-grained token: Branch: Delete at project

  3. branch.delete_merged

    Branch Delete Mergeddestructive

    Delete all branches merged into the default branch. Returns: a success confirmation. Protected and default branches are skipped. See also: branch.list, merge_request.list.

    Required parameters: project_id (string|integer)

    Fine-grained token: Branch: Delete at project

  4. branch.get

    Branch Getread-only

    Get a single branch by name. Returns: the branch with protection, default, and merged flags, push/merge permissions, the head commit object, and web URL. See also: branch.list, branch.protect, branch.unprotect.

    Required parameters: branch_name (string), project_id (string|integer)

    Fine-grained token: Branch: Read at project

  5. branch.get_protected

    Protected Branch Getread-only

    Get a single protected branch or wildcard rule by name. Returns: the rule with push, merge, and unprotect access-level arrays, allow-force-push, and CODEOWNERS-approval flags. See also: branch.list_protected, branch.update_protected, branch.unprotect.

    Required parameters: branch_name (string), project_id (string|integer)

    Fine-grained token: Protected Branch: Read at project

  6. branch.list

    Branch Listread-only

    List repository branches in one project with optional search/regex filtering, ordering, and offset or keyset pagination. Returns: matching branches with protection, default, merged flags, the head commit object, and pagination metadata. See also: branch.get, branch.create, repository.compare.

    Required parameters: project_id (string|integer)

    Fine-grained token: Branch: Read at project

  7. branch.list_protected

    Protected Branches Listread-only

    List protected branches and wildcard rules for a project with optional search, ordering, and offset pagination. Returns: protected rules with push/merge/unprotect access-level arrays and pagination metadata. See also: branch.get_protected, branch.protect, branch.update_protected.

    Required parameters: project_id (string|integer)

    Fine-grained token: Protected Branch: Read at project

  8. branch.protect

    Branch Protect

    Protect a branch or wildcard with push/merge/unprotect access levels and optional fine-grained allowed_to_push/merge/unprotect entries. Returns: the protected rule with its access-level arrays. Idempotent: returns the existing rule when the branch is already protected. See also: branch.unprotect, branch.get_protected, branch.update_protected.

    Required parameters: branch_name (string), project_id (string|integer)

    Fine-grained token: Branch: Protect at project. Some calls also need: Protected Branch: Read at project

  9. branch.rule_list

    List Branch Rulesread-only

    List a project's aggregated branch protection rules by full project path. Returns: each branch rule with its id, matched pattern, default and protected flags, matching branch count, branch protection settings (who may push, merge and unprotect, allow force push, code-owner approval required, security-policy flags), approval rules with eligible approvers, external status checks, and keyset pagination metadata. Pages forward only: this GitLab connection takes first and after, and rejects last and before. See also: branch.list_protected, branch.get_protected, project.get.

    Required parameters: project_path (string)

    Fine-grained token: none can run it at this GitLab release, which declares nothing for it; use a classic token

  10. branch.unprotect

    Branch Unprotectdestructive

    Remove protection from a branch (idempotent). Returns: a status and message confirming protection removed or already absent. See also: branch.protect, branch.get_protected, branch.delete.

    Required parameters: branch_name (string), project_id (string|integer)

    Fine-grained token: Branch: Protect at project

  11. branch.update_protected

    Protected Branch Update

    Update an existing protected branch rule: allow-force-push, CODEOWNERS approval, rename, or fine-grained allowed_to_push/merge/unprotect entries. Returns: the updated rule with its access-level arrays. See also: branch.get_protected, branch.list_protected, branch.protect.

    Required parameters: branch_name (string), project_id (string|integer)

    Fine-grained token: Protected Branch: Update at project