# GitLab Node

> Connects to GitLab's OAuth API to perform repo, branch, files, pipeline, issues, and release operations.

**URL:** https://caywork.com/learn/docs/node/gitlab-tool-node

## Content

The **GitLab Node** integrates securely with the GitLab API using OAuth 2.0. It enables your AI agent to manage repository resources, including branch operations, code files, issues, merge requests, tagging, releases, and CI/CD pipelines.

## Parameters

### Required Parameters
* **action** (string): The target GitLab tool action to run. Must be one of the enabled actions:
  * `gitlab_branch_create`: Create a new branch.
  * `gitlab_branch_delete`: Delete an existing branch.
  * `gitlab_branch_get`: Get details of a branch.
  * `gitlab_branches_list`: List all branches in a repository.
  * `gitlab_commit_comment_create`: Add a comment to a commit.
  * `gitlab_commit_comments_list`: List comments on a commit.
  * `gitlab_commit_diff_get`: Get the diff of a specific commit.
  * `gitlab_commit_get`: Get details of a specific commit.
  * `gitlab_commits_list`: List commits in a repository.
  * `gitlab_compare_refs`: Compare branches, tags, or commits.
  * `gitlab_current_user_get`: Get profile of authenticated user.
  * `gitlab_current_user_ssh_keys_list`: List SSH keys.
  * `gitlab_deploy_key_create`: Create a deploy key.
  * `gitlab_deploy_key_delete`: Delete a deploy key.
  * `gitlab_deploy_keys_list`: List deploy keys.
  * `gitlab_file_create`: Create a new file in a repository.
  * `gitlab_file_delete`: Delete a file from a repository.
  * `gitlab_file_get`: Get contents or metadata of a file.
  * `gitlab_file_update`: Update contents of an existing file.
  * `gitlab_global_search`: Search globally across GitLab.
  * `gitlab_group_create`: Create a new group.
  * `gitlab_group_delete`: Delete a group.
  * `gitlab_group_get`: Get details of a specific group.
  * `gitlab_group_member_add`: Add a member to a group.
  * `gitlab_group_member_remove`: Remove a member from a group.
  * `gitlab_group_members_list`: List group members.
  * `gitlab_group_projects_list`: List group projects.
  * `gitlab_group_update`: Update details of a group.
  * `gitlab_groups_list`: List groups.
  * `gitlab_issue_create`: Create a new issue.
  * `gitlab_issue_delete`: Delete an issue.
  * `gitlab_issue_get`: Get details of a specific issue.
  * `gitlab_issue_labels_list`: List labels on an issue.
  * `gitlab_issue_note_create`: Add a comment to an issue.
  * `gitlab_issue_note_delete`: Delete an issue comment.
  * `gitlab_issue_note_update`: Update an issue comment.
  * `gitlab_issue_notes_list`: List comments on an issue.
  * `gitlab_issue_update`: Update details of an issue.
  * `gitlab_issues_list`: List issues in a repository.
  * `gitlab_job_artifacts_download`: Download job artifacts.
  * `gitlab_job_cancel`: Cancel a running CI/CD job.
  * `gitlab_job_get`: Get details of a job.
  * `gitlab_job_log_get`: Retrieve console logs of a job.
  * `gitlab_job_retry`: Retry a failed job.
  * `gitlab_jobs_list`: List jobs in a repository.
  * `gitlab_label_create`: Create a new project label.
  * `gitlab_merge_request_approvals_get`: Get approvals for an MR.
  * `gitlab_merge_request_approve`: Approve a merge request.
  * `gitlab_merge_request_commits_list`: List commits in an MR.
  * `gitlab_merge_request_create`: Create a new merge request.
  * `gitlab_merge_request_diff_get`: Get the diff of a merge request.
  * `gitlab_merge_request_get`: Get details of a merge request.
  * `gitlab_merge_request_merge`: Accept and merge a merge request.
  * `gitlab_merge_request_note_create`: Add a comment to an MR.
  * `gitlab_merge_request_notes_list`: List comments on an MR.
  * `gitlab_merge_request_update`: Update a merge request.
  * `gitlab_merge_requests_list`: List merge requests.
  * `gitlab_milestone_create`: Create a new milestone.
  * `gitlab_milestone_delete`: Delete a milestone.
  * `gitlab_milestone_get`: Get details of a milestone.
  * `gitlab_milestone_update`: Update a milestone.
  * `gitlab_milestones_list`: List milestones.
  * `gitlab_namespaces_list`: List namespaces.
  * `gitlab_pipeline_cancel`: Cancel a running pipeline.
  * `gitlab_pipeline_create`: Trigger a new pipeline.
  * `gitlab_pipeline_delete`: Delete a pipeline record.
  * `gitlab_pipeline_get`: Get details of a pipeline.
  * `gitlab_pipeline_jobs_list`: List jobs belonging to a pipeline.
  * `gitlab_pipeline_retry`: Retry failed jobs in a pipeline.
  * `gitlab_pipelines_list`: List pipelines.
  * `gitlab_project_create`: Create a new project.
  * `gitlab_project_delete`: Delete a project.
  * `gitlab_project_fork`: Fork an existing project.
  * `gitlab_project_forks_list`: List project forks.
  * `gitlab_project_get`: Get details of a project.
  * `gitlab_project_member_add`: Add a member to a project.
  * `gitlab_project_member_remove`: Remove a member from a project.
  * `gitlab_project_members_list`: List project members.
  * `gitlab_project_search`: Search within a specific project.
  * `gitlab_project_snippet_create`: Create a project snippet.
  * `gitlab_project_snippet_get`: Get details of a snippet.
  * `gitlab_project_snippets_list`: List project snippets.
  * `gitlab_project_star`: Star a project.
  * `gitlab_project_unstar`: Unstar a project.
  * `gitlab_project_update`: Update details of a project.
  * `gitlab_project_variable_create`: Create a CI/CD project variable.
  * `gitlab_project_variable_delete`: Delete a CI/CD variable.
  * `gitlab_project_variable_get`: Get a CI/CD variable.
  * `gitlab_project_variable_update`: Update a CI/CD variable.
  * `gitlab_project_variables_list`: List all CI/CD variables.
  * `gitlab_project_webhook_create`: Add a webhook to a project.
  * `gitlab_project_webhook_delete`: Delete a project webhook.
  * `gitlab_project_webhook_get`: Get details of a webhook.
  * `gitlab_project_webhook_update`: Update a webhook.
  * `gitlab_project_webhooks_list`: List project webhooks.
  * `gitlab_projects_list`: List projects.
  * `gitlab_release_create`: Create a new project release.
  * `gitlab_release_delete`: Delete a project release.
  * `gitlab_release_get`: Get details of a release.
  * `gitlab_release_update`: Update a release.
  * `gitlab_releases_list`: List releases.
  * `gitlab_repository_tree_list`: List repository files and folders.
  * `gitlab_ssh_key_add`: Add an SSH key to the user profile.
  * `gitlab_tag_create`: Create a new release tag.
  * `gitlab_tag_delete`: Delete an existing tag.
  * `gitlab_tag_get`: Get details of a tag.
  * `gitlab_tags_list`: List tags.
  * `gitlab_user_get`: Get details of a user.
  * `gitlab_user_projects_list`: List projects belonging to a user.
  * `gitlab_users_list`: List all GitLab users.

### Optional Parameters
* **params** (object): A key-value dictionary containing action-specific inputs (e.g., `{'id': 'my-project', 'ref': 'main', 'title': 'Issue title'}`).

## Practical Use Cases
1. **Automated Release Workflows**: When merging code, automatically trigger a tag and release, publish artifacts, and create notes detailing the changes.
2. **Issue Triage and Resolution**: Automatically analyze new bug reports, trace error paths, modify project files, and submit merge requests with fix descriptions.