View as Markdown
GitLab icon

GitLab ACTION

List Project Labels

List the labels defined in a project. Call this before applying labels with Create Merge Request: GitLab creates a label it does not recognize rather than rejecting it, so an invented or mis-cased name silently adds a new project label instead of applying the intended one. Each result's name is the value to pass back; the description is worth reading because label names are often abbreviations. Narrow a long list with Search. See the documentation
  • Action
  • Read only
  • OAuth
  • SDK
  • MCP

IMPLEMENTATION

Call this tool

Connect a user's GitLab account once, then configure and run List Project Labels from your backend or agent.

import { PipedreamClient } from "@pipedream/sdk"

const pd = new PipedreamClient({
  projectId: process.env.PIPEDREAM_PROJECT_ID!,
  clientId: process.env.PIPEDREAM_CLIENT_ID!,
  clientSecret: process.env.PIPEDREAM_CLIENT_SECRET!,
  projectEnvironment: "production",
})

const result = await pd.actions.run({
  id: "gitlab-list-project-labels",
  externalUserId: "{external_user_id}", // any stable ID for this user in your system
  configuredProps: {
    gitlab: { authProvisionId: "apn_xxxxxxx" },
    projectId: "Project",
    search: "Search",
  },
})

console.log(result)

SCHEMA

Inputs

Pipedream supplies the connected account. Your application provides the operation-specific values below. Dynamic inputs are resolved against that user's account.

List Project Labels inputs
Property Type Description
projectId Project string
The project, given either as its path — group/project or group/subgroup/project, e.g. backend/payments — or as its numeric project ID. The path is what appears in the project URL and is usually what a user will name, so prefer it. A pasted GitLab URL also works. Use List Projects to find the path if you only know part of the name.
Required
search Search string
Return only labels whose name or description contains this text (case-insensitive). Leave blank for every label in the project.
Optional
maxResults Max Results integer
Maximum number of labels to return in total, paginating as needed. Defaults to 100. A project with a large label set may need more.
Optional

REFERENCE

Tool details

Behavior hints are published with the component in the Pipedream registry and surface as MCP tool annotations, so an agent can reason about a tool before it calls it.

Registry key
gitlab-list-project-labels
Version
0.0.1
App
GitLab
Authentication
OAuth
Read-only
Yes
Destructive
No
Open world
Yes