GitLab · Capability

GitLab Webhooks API — Webhook Configuration

GitLab Webhooks API — Webhook Configuration. 4 operations. Lead operation: GitLab Set a Webhook Custom Header. Self-contained Naftiko capability covering one Gitlab business surface.

Run with Naftiko GitlabWebhook Configuration

What You Can Do

PUT
Setwebhookcustomheader — GitLab Set a Webhook Custom Header
/v1/projects/{id}/hooks/{hook-id}/custom-headers/{key}
DELETE
Deletewebhookcustomheader — GitLab Delete a Webhook Custom Header
/v1/projects/{id}/hooks/{hook-id}/custom-headers/{key}
PUT
Setwebhookurlvariable — GitLab Set a Webhook URL Variable
/v1/projects/{id}/hooks/{hook-id}/url-variables/{key}
DELETE
Deletewebhookurlvariable — GitLab Delete a Webhook URL Variable
/v1/projects/{id}/hooks/{hook-id}/url-variables/{key}

MCP Tools

gitlab-set-webhook-custom-header

GitLab Set a Webhook Custom Header

idempotent
gitlab-delete-webhook-custom-header

GitLab Delete a Webhook Custom Header

idempotent
gitlab-set-webhook-url-variable

GitLab Set a Webhook URL Variable

idempotent
gitlab-delete-webhook-url-variable

GitLab Delete a Webhook URL Variable

idempotent

Capability Spec

webhooks-webhook-configuration.yaml Raw ↑
naftiko: 1.0.0-alpha2
info:
  label: GitLab Webhooks API — Webhook Configuration
  description: 'GitLab Webhooks API — Webhook Configuration. 4 operations. Lead operation: GitLab Set a Webhook Custom Header.
    Self-contained Naftiko capability covering one Gitlab business surface.'
  tags:
  - Gitlab
  - Webhook Configuration
  created: '2026-05-19'
  modified: '2026-05-19'
binds:
- namespace: env
  keys:
    GITLAB_API_KEY: GITLAB_API_KEY
capability:
  consumes:
  - type: http
    namespace: webhooks-webhook-configuration
    baseUri: https://gitlab.com/api/v4
    description: GitLab Webhooks API — Webhook Configuration business capability. Self-contained, no shared references.
    resources:
    - name: projects-id-hooks-hook_id-custom_headers-key
      path: /projects/{id}/hooks/{hook_id}/custom_headers/{key}
      operations:
      - name: setwebhookcustomheader
        method: PUT
        description: GitLab Set a Webhook Custom Header
        outputRawFormat: json
        outputParameters:
        - name: result
          type: object
          value: $.
        inputParameters:
        - name: key
          in: path
          type: string
          description: The name of the custom header.
          required: true
        - name: body
          in: body
          type: object
          description: Request body (JSON).
          required: true
      - name: deletewebhookcustomheader
        method: DELETE
        description: GitLab Delete a Webhook Custom Header
        outputRawFormat: json
        outputParameters:
        - name: result
          type: object
          value: $.
        inputParameters:
        - name: key
          in: path
          type: string
          description: The name of the custom header to delete.
          required: true
    - name: projects-id-hooks-hook_id-url_variables-key
      path: /projects/{id}/hooks/{hook_id}/url_variables/{key}
      operations:
      - name: setwebhookurlvariable
        method: PUT
        description: GitLab Set a Webhook URL Variable
        outputRawFormat: json
        outputParameters:
        - name: result
          type: object
          value: $.
        inputParameters:
        - name: key
          in: path
          type: string
          description: The name of the URL variable.
          required: true
        - name: body
          in: body
          type: object
          description: Request body (JSON).
          required: true
      - name: deletewebhookurlvariable
        method: DELETE
        description: GitLab Delete a Webhook URL Variable
        outputRawFormat: json
        outputParameters:
        - name: result
          type: object
          value: $.
        inputParameters:
        - name: key
          in: path
          type: string
          description: The name of the URL variable to delete.
          required: true
    authentication:
      type: bearer
      token: '{{env.GITLAB_API_KEY}}'
  exposes:
  - type: rest
    namespace: webhooks-webhook-configuration-rest
    port: 8080
    description: REST adapter for GitLab Webhooks API — Webhook Configuration. One Spectral-compliant resource per consumed
      operation, prefixed with /v1.
    resources:
    - path: /v1/projects/{id}/hooks/{hook-id}/custom-headers/{key}
      name: projects-id-hooks-hook-id-custom-headers-key
      description: REST surface for projects-id-hooks-hook_id-custom_headers-key.
      operations:
      - method: PUT
        name: setwebhookcustomheader
        description: GitLab Set a Webhook Custom Header
        call: webhooks-webhook-configuration.setwebhookcustomheader
        with:
          key: rest.key
          body: rest.body
        outputParameters:
        - type: object
          mapping: $.
      - method: DELETE
        name: deletewebhookcustomheader
        description: GitLab Delete a Webhook Custom Header
        call: webhooks-webhook-configuration.deletewebhookcustomheader
        with:
          key: rest.key
        outputParameters:
        - type: object
          mapping: $.
    - path: /v1/projects/{id}/hooks/{hook-id}/url-variables/{key}
      name: projects-id-hooks-hook-id-url-variables-key
      description: REST surface for projects-id-hooks-hook_id-url_variables-key.
      operations:
      - method: PUT
        name: setwebhookurlvariable
        description: GitLab Set a Webhook URL Variable
        call: webhooks-webhook-configuration.setwebhookurlvariable
        with:
          key: rest.key
          body: rest.body
        outputParameters:
        - type: object
          mapping: $.
      - method: DELETE
        name: deletewebhookurlvariable
        description: GitLab Delete a Webhook URL Variable
        call: webhooks-webhook-configuration.deletewebhookurlvariable
        with:
          key: rest.key
        outputParameters:
        - type: object
          mapping: $.
  - type: mcp
    namespace: webhooks-webhook-configuration-mcp
    port: 9090
    transport: http
    description: MCP adapter for GitLab Webhooks API — Webhook Configuration. One tool per consumed operation, routed inline
      through this capability's consumes block.
    tools:
    - name: gitlab-set-webhook-custom-header
      description: GitLab Set a Webhook Custom Header
      hints:
        readOnly: false
        destructive: false
        idempotent: true
      call: webhooks-webhook-configuration.setwebhookcustomheader
      with:
        key: tools.key
        body: tools.body
      outputParameters:
      - type: object
        mapping: $.
    - name: gitlab-delete-webhook-custom-header
      description: GitLab Delete a Webhook Custom Header
      hints:
        readOnly: false
        destructive: true
        idempotent: true
      call: webhooks-webhook-configuration.deletewebhookcustomheader
      with:
        key: tools.key
      outputParameters:
      - type: object
        mapping: $.
    - name: gitlab-set-webhook-url-variable
      description: GitLab Set a Webhook URL Variable
      hints:
        readOnly: false
        destructive: false
        idempotent: true
      call: webhooks-webhook-configuration.setwebhookurlvariable
      with:
        key: tools.key
        body: tools.body
      outputParameters:
      - type: object
        mapping: $.
    - name: gitlab-delete-webhook-url-variable
      description: GitLab Delete a Webhook URL Variable
      hints:
        readOnly: false
        destructive: true
        idempotent: true
      call: webhooks-webhook-configuration.deletewebhookurlvariable
      with:
        key: tools.key
      outputParameters:
      - type: object
        mapping: $.