> ## Documentation Index
> Fetch the complete documentation index at: https://docs.guild.ai/llms.txt
> Use this file to discover all available pages before exploring further.

> ## Agent Instructions
> To act on a user's behalf in Guild, use the Guild REST API at https://api.guild.ai/v1.
> The OpenAPI spec is unauthenticated: https://docs.guild.ai/openapi.json (or openapi.yaml).
> Authenticate with an account API key, sent as HTTP Basic (key id as username, secret as password) or as `Authorization: Bearer <api_key_id>:<api_key_secret>`. See https://docs.guild.ai/api-reference/introduction#authentication.
> To run one agent on demand without account-wide access, use an API trigger instead: https://docs.guild.ai/platform/api-triggers.
> To act on Guild from an MCP client, connect to https://api.guild.ai/mcp (OAuth) or run `guild mcp` locally. Setup: https://docs.guild.ai/api-reference/mcp.
> To search these docs from an MCP client, connect to https://docs.guild.ai/mcp. The full page index is https://docs.guild.ai/llms.txt.

# Triage GitLab issues and merge requests from Guild agents

> Connect Guild agents to GitLab with one of two integrations: the REST API for projects, issues, merge requests, and pipelines, or GraphQL for any query.

Integrations · GitLab

Guild agents read, update, and delete GitLab resources on your team's behalf. Guild offers two GitLab integrations: one covers the GitLab REST API with a tool per operation, the other sends any GraphQL query or mutation through a single tool. Both keep your personal access token server-side, and credential policies decide which operations each agent may call.

> [card] [Book a demo](https://guild-ai.cal.com/gtm/meeting-with-guild.ai)
>
> See how teams govern agents that use GitLab.

> [card] [Talk to sales](https://guild.ai/talk-to-sales)
>
> Get access to Guild, then connect GitLab to your first agent.

## Choose an integration

Both integrations call GitLab.com with a GitLab personal access token. They differ in how an agent reaches the API.

| | GitLab | GitLab GraphQL |
| - | - | - |
| Integration | `guildai~gitlab-openapi` | `guildai~gitlab-graphql` |
| Covers | Projects, issues, merge requests, pipelines, branches, commits, runners, and container registry and package protection rules | Anything in the GitLab GraphQL API, through one tool that runs a query or mutation |
| Header | `PRIVATE-TOKEN: <token>` | `Authorization: Bearer <token>` |
| Tools | `gitlab_openapi_` prefix, from `GitlabOpenapiTools` | `gitlab_graphql_graphql_query`, from `GitlabGraphqlTools` |

Use **GitLab** for most agents: each operation is its own tool, so a credential policy can allow or deny it by name. Use **GitLab GraphQL** when an agent needs data the REST tools don't cover, or wants several related records in one request.

## How it works

**1. Generate a GitLab personal access token**

Create a personal access token in GitLab with the scopes your agent needs: `read_api` for read-only work, or `api` to make changes. The same token works for both integrations.

**2. Connect the credential in Guild**

Go to **Access & setup > Credentials**, click **Connect**, select **gitlab-openapi** or **gitlab-graphql**, and paste the token into **API Key**.

**3. Import tools and pick what you need**

Import the integration's tools and use [`pick()`](https://docs.guild.ai/sdk/tools#selecting-specific-tools) to include only the tools your agent needs.

## Why GitLab access needs governing

GitLab tools can delete projects, branches, pipelines, and merge requests, and can unassign runners or remove protection rules. A GraphQL mutation can change data across projects in one call. A personal access token scoped too broadly lets any agent that uses it act on any resource the token owner can reach. Guild's [credential policies](https://docs.guild.ai/platform/credential-policies.md) let you write `ALLOW` and `DENY` rules that the credential proxy enforces before any request leaves Guild, limiting agents by operation name, HTTP method, agent identity, or workspace. A matching `DENY` rule always wins over any `ALLOW` rule.

Guild stores the token server-side and injects it as a header after the policy check passes. Agent code, prompts, and containers never see it. You can scope a credential to one workspace, one member, or one installed agent using the options in [Credentials](https://docs.guild.ai/platform/credentials.md), so the token's reach matches the agent's actual job rather than the token owner's full permissions.

## Authentication

* **Type:** API key: a GitLab personal access token
* **Applies to:** both integrations, each with its own credential

Connect **gitlab-openapi**, **gitlab-graphql**, or both, and paste the same token into each if you like. Guild sends it as `PRIVATE-TOKEN` for the REST integration and as a bearer token for GraphQL.

See [Credentials](https://docs.guild.ai/platform/credentials.md) for workspace, member, and agent-scoped credentials.

## Usage

### GitLab

```typescript theme={null}
import { GitlabOpenapiTools } from "@guildai-services/guildai~gitlab-openapi"
import { llmAgent, pick } from "@guildai/agents-sdk"

export default llmAgent({
  systemPrompt: "You triage new GitLab issues and summarize open merge requests.",
  tools: {
    ...pick(GitlabOpenapiTools, [
      "gitlab_openapi_get_api_v4_projects_id_issues",
      "gitlab_openapi_put_api_v4_projects_id_issues_issue_iid",
      "gitlab_openapi_get_api_v4_projects_id_merge_requests",
    ]),
  },
})
```

### GitLab GraphQL

```typescript theme={null}
import { GitlabGraphqlTools } from "@guildai-services/guildai~gitlab-graphql"
import { llmAgent } from "@guildai/agents-sdk"

export default llmAgent({
  systemPrompt: "You report each project's open merge requests and their pipeline status in one query.",
  tools: { ...GitlabGraphqlTools },
})
```

## Tools

### GitLab tools

Tools in the latest published version of `guildai~gitlab-openapi`:

> [accordion] All 167 tools
>
> | Tool | What it does |
> | - | - |
> | `gitlab_openapi_delete_api_v4_projects_id` | Deletes a specified project. |
> | `gitlab_openapi_delete_api_v4_projects_id_fork` | Deletes a fork relationship between projects. |
> | `gitlab_openapi_delete_api_v4_projects_id_issues_issue_iid` | Deletes a specified issue. |
> | `gitlab_openapi_delete_api_v4_projects_id_issues_issue_iid_links_issue_link_id` | Deletes a specified issue link, removing the two-way relationship. |
> | `gitlab_openapi_delete_api_v4_projects_id_merge_requests_merge_request_iid` | Deletes a specified merge request for a project. |
> | `gitlab_openapi_delete_api_v4_projects_id_merge_requests_merge_request_iid_blocks_block_id` | Removes a merge request dependency. |
> | `gitlab_openapi_delete_api_v4_projects_id_merge_requests_merge_request_iid_context_commits` | Deletes specified context commits from a merge request. |
> | `gitlab_openapi_delete_api_v4_projects_id_packages_protection_rules_package_protection_rule_id` | Deletes a package protection rule from a specified project. |
> | `gitlab_openapi_delete_api_v4_projects_id_pipelines_pipeline_id` | Deletes a specified pipeline for a project. |
> | `gitlab_openapi_delete_api_v4_projects_id_registry_protection_repository_rules_protection_rule_id` | Deletes a specified container repository protection rule. |
> | `gitlab_openapi_delete_api_v4_projects_id_registry_protection_tag_rules_protection_rule_id` | Deletes a container registry protection tag rule from a project. |
> | `gitlab_openapi_delete_api_v4_projects_id_repository_branches_branch` | Deletes a specified branch from the repository. |
> | `gitlab_openapi_delete_api_v4_projects_id_repository_merged_branches` | Deletes all branches that are merged into the default branch for a project. |
> | `gitlab_openapi_delete_api_v4_projects_id_runners_runner_id` | Unassigns a specified project runner from a project. |
> | `gitlab_openapi_delete_api_v4_projects_id_share_group_id` | Deletes a shared project link in a group. |
> | `gitlab_openapi_delete_api_v4_projects_id_terraform_state_protection_rules_terraform_state_protection_rule_id` | This feature was introduced in GitLab 19.0. |
> | `gitlab_openapi_delete_api_v4_projects_id_uploads_secret_filename` | Deletes an uploaded file with a specified secret and filename. |
> | `gitlab_openapi_delete_api_v4_projects_id_uploads_upload_id` | Deletes an uploaded file with a specified ID. |
> | `gitlab_openapi_get_api_v4_groups_id_merge_requests` | Lists all merge requests for a specified group and any subgroups. |
> | `gitlab_openapi_get_api_v4_issues` | Lists all issues accessible by the currently authenticated user. |
> | `gitlab_openapi_get_api_v4_issues_id` | Retrieves a specified issue. |
> | `gitlab_openapi_get_api_v4_issues_statistics` | Retrieves statistics for issues accessible by the currently authenticated user. |
> | `gitlab_openapi_get_api_v4_merge_requests` | Lists all merge requests accessible to the authenticated user. |
> | `gitlab_openapi_get_api_v4_pipelines` | Lists recently created pipelines across all projects that were triggered by the authenticated user. |
> | `gitlab_openapi_get_api_v4_projects` | Lists all projects. |
> | `gitlab_openapi_get_api_v4_projects_id` | Retrieves details on a specified project. |
> | `gitlab_openapi_get_api_v4_projects_id_ai_agent_sessions` | Returns a paginated list of external agent sessions for the project. |
> | `gitlab_openapi_get_api_v4_projects_id_audit_events` | Lists all audit events for a specified project. |
> | `gitlab_openapi_get_api_v4_projects_id_audit_events_audit_event_id` | Retrieves an audit event for a specified project. |
> | `gitlab_openapi_get_api_v4_projects_id_dash_search` | Searches for content in a specified project. |
> | `gitlab_openapi_get_api_v4_projects_id_forks` | Lists all forks of a project. |
> | `gitlab_openapi_get_api_v4_projects_id_groups` | Lists all ancestor groups for a specified project. |
> | `gitlab_openapi_get_api_v4_projects_id_invited_groups` | Lists all invited groups in a project. |
> | `gitlab_openapi_get_api_v4_projects_id_issues` | Lists all issues for a specified project. |
> | `gitlab_openapi_get_api_v4_projects_id_issues_issue_iid` | Retrieves a specified issue for a project. |
> | `gitlab_openapi_get_api_v4_projects_id_issues_issue_iid_closed_by` | Lists all merge requests that close a specified issue when merged. |
> | `gitlab_openapi_get_api_v4_projects_id_issues_issue_iid_links` | Lists all linked issues for a specified issue, sorted by the relationship creation datetime (ascending). |
> | `gitlab_openapi_get_api_v4_projects_id_issues_issue_iid_links_issue_link_id` | Retrieves a specified issue link. |
> | `gitlab_openapi_get_api_v4_projects_id_issues_issue_iid_participants` | Lists all users that are participants in a specified issue. |
> | `gitlab_openapi_get_api_v4_projects_id_issues_issue_iid_related_merge_requests` | Lists all merge requests that are related to a specified issue. |
> | `gitlab_openapi_get_api_v4_projects_id_issues_issue_iid_time_stats` | Retrieves time tracking stats for a specified issue, including time estimate and time spent in seconds and human-readable format (for example, `1h 30m`). |
> | `gitlab_openapi_get_api_v4_projects_id_issues_issue_iid_user_agent_detail` | Retrieves user agent details for an issue. |
> | `gitlab_openapi_get_api_v4_projects_id_issues_statistics` | Retrieves statistics for issues in a specified project. |
> | `gitlab_openapi_get_api_v4_projects_id_languages` | Retrieves information about all programming languages used in a specified project. |
> | `gitlab_openapi_get_api_v4_projects_id_merge_requests` | Lists all project merge requests. |
> | `gitlab_openapi_get_api_v4_projects_id_merge_requests_merge_request_iid` | Retrieves a merge request for a specified project. |
> | `gitlab_openapi_get_api_v4_projects_id_merge_requests_merge_request_iid_blockees` | Retrieves merge requests blocked by a specified merge request. |
> | `gitlab_openapi_get_api_v4_projects_id_merge_requests_merge_request_iid_blocks` | List all merge request dependencies for a specified merge request. |
> | `gitlab_openapi_get_api_v4_projects_id_merge_requests_merge_request_iid_blocks_block_id` | Retrieves a specified merge request dependency. |
> | `gitlab_openapi_get_api_v4_projects_id_merge_requests_merge_request_iid_changes` | Retrieves changes for a specified merge request. |
> | `gitlab_openapi_get_api_v4_projects_id_merge_requests_merge_request_iid_closes_issues` | Lists all issues that close on merge. |
> | `gitlab_openapi_get_api_v4_projects_id_merge_requests_merge_request_iid_commits` | Retrieves commits for a specified merge request. |
> | `gitlab_openapi_get_api_v4_projects_id_merge_requests_merge_request_iid_context_commits` | Lists all context commits for a specified merge request. |
> | `gitlab_openapi_get_api_v4_projects_id_merge_requests_merge_request_iid_diffs` | Lists all merge request diffs. |
> | `gitlab_openapi_get_api_v4_projects_id_merge_requests_merge_request_iid_merge_ref` | Merges the changes between the merge request source and target branches into the `refs/merge-requests/:iid/merge` ref, of the target project repository, if possible. |
> | `gitlab_openapi_get_api_v4_projects_id_merge_requests_merge_request_iid_participants` | Retrieves participants for a specified merge request. |
> | `gitlab_openapi_get_api_v4_projects_id_merge_requests_merge_request_iid_pipelines` | Lists all merge request pipelines. |
> | `gitlab_openapi_get_api_v4_projects_id_merge_requests_merge_request_iid_raw_diffs` | Retrieves the raw diffs of the files changed in a merge request. |
> | `gitlab_openapi_get_api_v4_projects_id_merge_requests_merge_request_iid_related_issues` | Lists all issues related to the merge request. |
> | `gitlab_openapi_get_api_v4_projects_id_merge_requests_merge_request_iid_reviewers` | Retrieves reviewers for a specified merge request. |
> | `gitlab_openapi_get_api_v4_projects_id_merge_requests_merge_request_iid_time_stats` | Retrieves time tracking stats for a specified merge request, including time estimate and time spent in seconds and human-readable format (for example, `1h 30m`). |
> | `gitlab_openapi_get_api_v4_projects_id_merge_requests_merge_request_iid_versions` | Retrieves merge request diff versions. |
> | `gitlab_openapi_get_api_v4_projects_id_merge_requests_merge_request_iid_versions_version_id` | Retrieves a merge request diff version. |
> | `gitlab_openapi_get_api_v4_projects_id_packages_protection_rules` | Lists all package protection rules for a specified project. |
> | `gitlab_openapi_get_api_v4_projects_id_pages_access` | Verifies if the current user can access GitLab Pages in a specified project. |
> | `gitlab_openapi_get_api_v4_projects_id_pipelines` | Lists all pipelines in a project. |
> | `gitlab_openapi_get_api_v4_projects_id_pipelines_latest` | Retrieves the latest pipeline for the most recent commit on a specified ref in a project. |
> | `gitlab_openapi_get_api_v4_projects_id_pipelines_pipeline_id` | Retrieves a specified pipeline from a project. |
> | `gitlab_openapi_get_api_v4_projects_id_pipelines_pipeline_id_bridges` | Deprecated in GitLab 19.2. |
> | `gitlab_openapi_get_api_v4_projects_id_pipelines_pipeline_id_jobs` | Lists all jobs for a specified pipeline. |
> | `gitlab_openapi_get_api_v4_projects_id_pipelines_pipeline_id_test_report` | Retrieves a test report for a pipeline. |
> | `gitlab_openapi_get_api_v4_projects_id_pipelines_pipeline_id_test_report_summary` | Retrieves a test report summary for a pipeline. |
> | `gitlab_openapi_get_api_v4_projects_id_pipelines_pipeline_id_trigger_jobs` | Lists all trigger jobs for a specified pipeline. |
> | `gitlab_openapi_get_api_v4_projects_id_pipelines_pipeline_id_variables` | Lists all pipeline variables for a specified pipeline. |
> | `gitlab_openapi_get_api_v4_projects_id_registry_protection_repository_rules` | Lists all container repository protection rules for a specified project. |
> | `gitlab_openapi_get_api_v4_projects_id_registry_protection_tag_rules` | Lists all container registry protection tag rules for a project. |
> | `gitlab_openapi_get_api_v4_projects_id_repository_branches` | Lists all repository branches from a specified project, sorted alphabetically by name. |
> | `gitlab_openapi_get_api_v4_projects_id_repository_branches_branch` | Retrieves a specified project repository branch. |
> | `gitlab_openapi_get_api_v4_projects_id_repository_commits` | Lists all commits for a specified project repository. |
> | `gitlab_openapi_get_api_v4_projects_id_repository_commits_sha` | Retrieves a specified commit identified by the commit hash or name of a branch or tag. |
> | `gitlab_openapi_get_api_v4_projects_id_repository_commits_sha_comments` | Lists all the comments of a commit in a project. |
> | `gitlab_openapi_get_api_v4_projects_id_repository_commits_sha_diff` | Retrieves the diff of a commit in a project. |
> | `gitlab_openapi_get_api_v4_projects_id_repository_commits_sha_merge_requests` | Lists all merge requests associated with a specified commit. |
> | `gitlab_openapi_get_api_v4_projects_id_repository_commits_sha_refs` | Lists all references (from branches or tags) a commit is pushed to. |
> | `gitlab_openapi_get_api_v4_projects_id_repository_commits_sha_sequence` | Retrieves the commit sequence for a specified commit. |
> | `gitlab_openapi_get_api_v4_projects_id_repository_commits_sha_signature` | Retrieves the signature from a commit, if it is signed. |
> | `gitlab_openapi_get_api_v4_projects_id_runners` | List all runners available in the project, including from ancestor groups and any allowed shared runners. |
> | `gitlab_openapi_get_api_v4_projects_id_security_settings` | Lists all security settings for the project. |
> | `gitlab_openapi_get_api_v4_projects_id_share_locations` | Lists all groups that can be invited to a project. |
> | `gitlab_openapi_get_api_v4_projects_id_starrers` | Lists all users who starred a specified project. |
> | `gitlab_openapi_get_api_v4_projects_id_statistics` | Retrieves the clone and pull statistics for the last 30 days from a specified project. |
> | `gitlab_openapi_get_api_v4_projects_id_storage` | Retrieves the path to repository storage for a specified project. |
> | `gitlab_openapi_get_api_v4_projects_id_terraform_state_protection_rules` | Lists all Terraform state protection rules for a project. |
> | `gitlab_openapi_get_api_v4_projects_id_transfer_locations` | Lists all namespaces where a specified project can be transferred. |
> | `gitlab_openapi_get_api_v4_projects_id_uploads` | Lists all uploads of a project sorted by `created_at` in descending order. |
> | `gitlab_openapi_get_api_v4_projects_id_users` | Lists all members with access to a specified project. |
> | `gitlab_openapi_get_api_v4_runners_id_projects` | Get a paginated list of all projects associated with the specified runner. |
> | `gitlab_openapi_get_api_v4_users_user_id_contributed_projects` | Lists all contributions to visible projects for a specified user. |
> | `gitlab_openapi_get_api_v4_users_user_id_projects` | Lists all personal projects for a specified user. |
> | `gitlab_openapi_get_api_v4_users_user_id_starred_projects` | Lists all visible projects starred by a specified user. |
> | `gitlab_openapi_patch_api_v4_projects_id_ai_agent_sessions_session_id` | Marks a session as completed or failed. |
> | `gitlab_openapi_patch_api_v4_projects_id_packages_protection_rules_package_protection_rule_id` | Updates a package protection rule for a specified project. |
> | `gitlab_openapi_patch_api_v4_projects_id_registry_protection_repository_rules_protection_rule_id` | Updates a container repository protection rule for a specified project. |
> | `gitlab_openapi_patch_api_v4_projects_id_registry_protection_tag_rules_protection_rule_id` | Updates a container registry protection tag rule for a project. |
> | `gitlab_openapi_patch_api_v4_projects_id_terraform_state_protection_rules_terraform_state_protection_rule_id` | This feature was introduced in GitLab 19.0. |
> | `gitlab_openapi_post_api_v4_projects` | Creates a project owned by the authenticated user. |
> | `gitlab_openapi_post_api_v4_projects_id_ai_agent_audit_events` | Accepts a batch of up to 500 audit events for an external agent session. |
> | `gitlab_openapi_post_api_v4_projects_id_ai_agent_identities` | Registers a new agent identity for the current user, project, agent type, and machine fingerprint combination. |
> | `gitlab_openapi_post_api_v4_projects_id_ai_agent_sessions` | Creates a new external agent session for the current user and project. |
> | `gitlab_openapi_post_api_v4_projects_id_archive` | Archives a specified project. |
> | `gitlab_openapi_post_api_v4_projects_id_create_ci_config` | Creates a merge request to add CI configuration to a specified project. |
> | `gitlab_openapi_post_api_v4_projects_id_fork` | Creates a fork of a project. |
> | `gitlab_openapi_post_api_v4_projects_id_fork_forked_from_id` | Creates a fork relationship between a project and an upstream project. |
> | `gitlab_openapi_post_api_v4_projects_id_housekeeping` | Starts the housekeeping task for a project. |
> | `gitlab_openapi_post_api_v4_projects_id_import_project_members_project_id` | Imports members from another project. |
> | `gitlab_openapi_post_api_v4_projects_id_issues` | Creates an issue for a specified project. |
> | `gitlab_openapi_post_api_v4_projects_id_issues_issue_iid_add_spent_time` | Adds spent time for a specified issue. |
> | `gitlab_openapi_post_api_v4_projects_id_issues_issue_iid_clone` | Clones a specified issue to a project. |
> | `gitlab_openapi_post_api_v4_projects_id_issues_issue_iid_links` | Creates a two-way relationship between two issues. |
> | `gitlab_openapi_post_api_v4_projects_id_issues_issue_iid_move` | Moves a specified issue to a different project. |
> | `gitlab_openapi_post_api_v4_projects_id_issues_issue_iid_reset_spent_time` | Resets the total spent time for a specified issue to `0` seconds. |
> | `gitlab_openapi_post_api_v4_projects_id_issues_issue_iid_reset_time_estimate` | Resets the estimated time for a specified issue to `0` seconds. |
> | `gitlab_openapi_post_api_v4_projects_id_issues_issue_iid_time_estimate` | Sets an estimated time of work for a specified issue. |
> | `gitlab_openapi_post_api_v4_projects_id_merge_requests` | Creates a merge request for a project. |
> | `gitlab_openapi_post_api_v4_projects_id_merge_requests_merge_request_iid_add_spent_time` | Adds spent time for a specified merge request. |
> | `gitlab_openapi_post_api_v4_projects_id_merge_requests_merge_request_iid_blocks` | Creates a merge request dependency between two merge requests. |
> | `gitlab_openapi_post_api_v4_projects_id_merge_requests_merge_request_iid_cancel_auto_merge` | Cancels an automatic merge for a merge request that has been set to merge automatically. |
> | `gitlab_openapi_post_api_v4_projects_id_merge_requests_merge_request_iid_cancel_merge_when_pipeline_succeeds` | Cancels an automatic merge for a merge request that has been set to merge when the pipeline succeeds. |
> | `gitlab_openapi_post_api_v4_projects_id_merge_requests_merge_request_iid_context_commits` | Creates context commits for a specified merge request. |
> | `gitlab_openapi_post_api_v4_projects_id_merge_requests_merge_request_iid_pipelines` | Creates a merge request pipeline. |
> | `gitlab_openapi_post_api_v4_projects_id_merge_requests_merge_request_iid_reset_spent_time` | Resets the total spent time for a specified merge request to `0` seconds. |
> | `gitlab_openapi_post_api_v4_projects_id_merge_requests_merge_request_iid_reset_time_estimate` | Resets the estimated time for a specified merge request to `0` seconds. |
> | `gitlab_openapi_post_api_v4_projects_id_merge_requests_merge_request_iid_time_estimate` | Sets an estimated time of work for a specified merge request. |
> | `gitlab_openapi_post_api_v4_projects_id_packages_protection_rules` | Creates a package protection rule for a specified project. |
> | `gitlab_openapi_post_api_v4_projects_id_pipeline` | Creates a pipeline in the specified project. |
> | `gitlab_openapi_post_api_v4_projects_id_pipelines_pipeline_id_cancel` | Cancels all jobs in a specified pipeline. |
> | `gitlab_openapi_post_api_v4_projects_id_pipelines_pipeline_id_retry` | Retries failed or canceled jobs in a pipeline. |
> | `gitlab_openapi_post_api_v4_projects_id_registry_protection_repository_rules` | Creates a container repository protection rule for a specified project to control who can push or delete container images. |
> | `gitlab_openapi_post_api_v4_projects_id_registry_protection_tag_rules` | Creates a container registry protection tag rule for a project to control who can push or delete container tags. |
> | `gitlab_openapi_post_api_v4_projects_id_repository_branches` | Creates a branch in the repository. |
> | `gitlab_openapi_post_api_v4_projects_id_repository_commits` | This feature was introduced in GitLab 8.13 |
> | `gitlab_openapi_post_api_v4_projects_id_repository_commits_sha_cherry_pick` | Cherry-picks a commit to a specified branch. |
> | `gitlab_openapi_post_api_v4_projects_id_repository_commits_sha_comments` | Creates a comment on a commit. |
> | `gitlab_openapi_post_api_v4_projects_id_repository_commits_sha_revert` | Reverts a commit in a specified branch. |
> | `gitlab_openapi_post_api_v4_projects_id_repository_size` | This feature was introduced in GitLab 15.0. |
> | `gitlab_openapi_post_api_v4_projects_id_restore` | Restores a specified project that was marked for deletion. |
> | `gitlab_openapi_post_api_v4_projects_id_runners` | Assigns an available project runner to a project. |
> | `gitlab_openapi_post_api_v4_projects_id_runners_reset_registration_token` | Resets the runner registration token for a specified project. |
> | `gitlab_openapi_post_api_v4_projects_id_share` | Shares a specified project with a group. |
> | `gitlab_openapi_post_api_v4_projects_id_star` | Stars a specified project. |
> | `gitlab_openapi_post_api_v4_projects_id_terraform_state_protection_rules` | This feature was introduced in GitLab 19.1. |
> | `gitlab_openapi_post_api_v4_projects_id_unarchive` | Unarchives a specified project. |
> | `gitlab_openapi_post_api_v4_projects_id_unstar` | Unstars a specified project. |
> | `gitlab_openapi_post_api_v4_projects_id_uploads` | Creates an upload. |
> | `gitlab_openapi_post_api_v4_projects_id_uploads_authorize` | This feature was introduced in GitLab 13.11 |
> | `gitlab_openapi_post_api_v4_projects_user_user_id` | Creates a project for a user. |
> | `gitlab_openapi_put_api_v4_projects_id` | Updates an existing project. |
> | `gitlab_openapi_put_api_v4_projects_id_issues_issue_iid` | Updates a specified issue for a project. |
> | `gitlab_openapi_put_api_v4_projects_id_issues_issue_iid_reorder` | Updates the order of a specified issue in a project. |
> | `gitlab_openapi_put_api_v4_projects_id_merge_requests_merge_request_iid` | Updates a merge request for a specified project. |
> | `gitlab_openapi_put_api_v4_projects_id_merge_requests_merge_request_iid_merge` | Merges a merge request. |
> | `gitlab_openapi_put_api_v4_projects_id_merge_requests_merge_request_iid_rebase` | Rebases a merge request. |
> | `gitlab_openapi_put_api_v4_projects_id_pipelines_pipeline_id_metadata` | Updates pipeline metadata. |
> | `gitlab_openapi_put_api_v4_projects_id_repository_branches_branch_protect` | Protects a single branch, or updates its protection if it is already protected. |
> | `gitlab_openapi_put_api_v4_projects_id_repository_branches_branch_unprotect` | Removes the protection from a single protected branch. |
> | `gitlab_openapi_put_api_v4_projects_id_security_settings` | Updates project security settings for a specified project. |
> | `gitlab_openapi_put_api_v4_projects_id_transfer` | Transfers a project to another namespace. |

### GitLab GraphQL tools

Tools in the latest published version of `guildai~gitlab-graphql`:

| Tool | What it does |
| - | - |
| `gitlab_graphql_graphql_query` | Send one GraphQL document. |

## Frequently asked questions

> [accordion] Which GitLab integration should I connect?
>
> Start with **GitLab** (`guildai~gitlab-openapi`). Its tools map one to one to REST operations, which makes credential policies precise. Add **GitLab GraphQL** (`guildai~gitlab-graphql`) when an agent needs data the REST tools don't cover.

> [accordion] Can I limit an agent to read-only GitLab access?
>
> Yes. For the REST integration, write a [credential policy](https://docs.guild.ai/platform/credential-policies.md) that denies `POST`, `PUT`, and `DELETE` operations, or denies operations by name pattern, while allowing everything else. GraphQL sends every query and mutation through one operation, so a policy can't tell them apart; give a read-only GraphQL agent a token with the `read_api` scope instead.

> [accordion] Does Guild support self-managed GitLab?
>
> Not yet. Both integrations call GitLab.com.

> [accordion] Do the GitLab integrations support webhook triggers?
>
> No. Neither catalog entry lists webhook events, so GitLab events can't trigger agents through Guild.

> [accordion] How do I give one agent its own GitLab token?
>
> Open the installed agent's page and connect a **Dedicated to this agent** credential. Only an admin of the account that owns the workspace, or the person who installed the agent, can connect one. See [Credentials](https://docs.guild.ai/platform/credentials.md) for the full resolution order.

## Put a governed agent on GitLab this week

> [card] [Book a demo](https://guild-ai.cal.com/gtm/meeting-with-guild.ai)
>
> See how teams govern agents that use GitLab.

> [card] [Talk to sales](https://guild.ai/talk-to-sales)
>
> Get access to Guild, then connect GitLab to your first agent.

## Related

**Also runs on Guild:** [Azure DevOps](https://docs.guild.ai/integrations/azure-devops.md) · [Bitbucket](https://docs.guild.ai/integrations/bitbucket.md) · [GitHub](https://docs.guild.ai/integrations/github.md) · [Cursor](https://docs.guild.ai/integrations/cursor-cloud-agents.md)

**Read:** Docs: [Credential policies](https://docs.guild.ai/platform/credential-policies.md) · [Credentials](https://docs.guild.ai/platform/credentials.md) · [Tools in agents](https://docs.guild.ai/sdk/tools.md)
