GitLab CI/CD · Capability

GitLab API — alert_management

GitLab API — alert_management. 5 operations. Lead operation: alert_management. Self-contained Naftiko capability covering one Gitlab Ci business surface.

Run with Naftiko Gitlab Cialert_management

What You Can Do

POST
Postapiv4projectsidalertmanagementalertsalertiidmetricimages — Upload a metric image for an alert
/v1/api/v4/projects/{id}/alert-management-alerts/{alert-iid}/metric-images
GET
Getapiv4projectsidalertmanagementalertsalertiidmetricimages — Metric Images for alert
/v1/api/v4/projects/{id}/alert-management-alerts/{alert-iid}/metric-images
POST
Postapiv4projectsidalertmanagementalertsalertiidmetricimagesauthorize — Workhorse authorize metric image file upload
/v1/api/v4/projects/{id}/alert-management-alerts/{alert-iid}/metric-images/authorize
PUT
Putapiv4projectsidalertmanagementalertsalertiidmetricimagesmetricimageid — Update a metric image for an alert
/v1/api/v4/projects/{id}/alert-management-alerts/{alert-iid}/metric-images/{metric-image-id}
DELETE
Deleteapiv4projectsidalertmanagementalertsalertiidmetricimagesmetricimageid — Remove a metric image for an alert
/v1/api/v4/projects/{id}/alert-management-alerts/{alert-iid}/metric-images/{metric-image-id}

MCP Tools

upload-metric-image-alert

Upload a metric image for an alert

metric-images-alert

Metric Images for alert

read-only idempotent
workhorse-authorize-metric-image-file

Workhorse authorize metric image file upload

update-metric-image-alert

Update a metric image for an alert

idempotent
remove-metric-image-alert

Remove a metric image for an alert

idempotent

Capability Spec

gitlab-ci-alert-management.yaml Raw ↑
naftiko: 1.0.0-alpha2
info:
  label: GitLab API — alert_management
  description: 'GitLab API — alert_management. 5 operations. Lead operation: alert_management. Self-contained Naftiko capability
    covering one Gitlab Ci business surface.'
  tags:
  - Gitlab Ci
  - alert_management
  created: '2026-05-19'
  modified: '2026-05-19'
binds:
- namespace: env
  keys:
    GITLAB_CI_API_KEY: GITLAB_CI_API_KEY
capability:
  consumes:
  - type: http
    namespace: gitlab-ci-alert-management
    baseUri: https://gitlab.com
    description: GitLab API — alert_management business capability. Self-contained, no shared references.
    resources:
    - name: api-v4-projects-id-alert_management_alerts-alert_iid-metric_images
      path: /api/v4/projects/{id}/alert_management_alerts/{alert_iid}/metric_images
      operations:
      - name: postapiv4projectsidalertmanagementalertsalertiidmetricimages
        method: POST
        description: Upload a metric image for an alert
        outputRawFormat: json
        outputParameters:
        - name: result
          type: object
          value: $.
        inputParameters:
        - name: id
          in: path
          type: string
          description: The ID or URL-encoded path of the project
          required: true
        - name: alert_iid
          in: path
          type: integer
          description: The IID of the Alert
          required: true
        - name: file
          in: formData
          type: file
          description: The image file to be uploaded
          required: true
        - name: url
          in: formData
          type: string
          description: The url to view more metric info
        - name: url_text
          in: formData
          type: string
          description: A description of the image or URL
      - name: getapiv4projectsidalertmanagementalertsalertiidmetricimages
        method: GET
        description: Metric Images for alert
        outputRawFormat: json
        outputParameters:
        - name: result
          type: object
          value: $.
        inputParameters:
        - name: id
          in: path
          type: string
          description: The ID or URL-encoded path of the project
          required: true
        - name: alert_iid
          in: path
          type: integer
          description: The IID of the Alert
          required: true
    - name: api-v4-projects-id-alert_management_alerts-alert_iid-metric_images-authorize
      path: /api/v4/projects/{id}/alert_management_alerts/{alert_iid}/metric_images/authorize
      operations:
      - name: postapiv4projectsidalertmanagementalertsalertiidmetricimagesauthorize
        method: POST
        description: Workhorse authorize metric image file upload
        outputRawFormat: json
        outputParameters:
        - name: result
          type: object
          value: $.
        inputParameters:
        - name: id
          in: path
          type: string
          description: The ID or URL-encoded path of the project
          required: true
        - name: alert_iid
          in: path
          type: integer
          description: The IID of the Alert
          required: true
    - name: api-v4-projects-id-alert_management_alerts-alert_iid-metric_images-metric_image_
      path: /api/v4/projects/{id}/alert_management_alerts/{alert_iid}/metric_images/{metric_image_id}
      operations:
      - name: putapiv4projectsidalertmanagementalertsalertiidmetricimagesmetricimageid
        method: PUT
        description: Update a metric image for an alert
        outputRawFormat: json
        outputParameters:
        - name: result
          type: object
          value: $.
        inputParameters:
        - name: id
          in: path
          type: string
          description: The ID or URL-encoded path of the project
          required: true
        - name: alert_iid
          in: path
          type: integer
          description: The IID of the Alert
          required: true
        - name: metric_image_id
          in: path
          type: integer
          description: The ID of metric image
          required: true
        - name: url
          in: formData
          type: string
          description: The url to view more metric info
        - name: url_text
          in: formData
          type: string
          description: A description of the image or URL
      - name: deleteapiv4projectsidalertmanagementalertsalertiidmetricimagesmetricimageid
        method: DELETE
        description: Remove a metric image for an alert
        outputRawFormat: json
        outputParameters:
        - name: result
          type: object
          value: $.
        inputParameters:
        - name: id
          in: path
          type: string
          description: The ID or URL-encoded path of the project
          required: true
        - name: alert_iid
          in: path
          type: integer
          description: The IID of the Alert
          required: true
        - name: metric_image_id
          in: path
          type: integer
          description: The ID of metric image
          required: true
  exposes:
  - type: rest
    namespace: gitlab-ci-alert-management-rest
    port: 8080
    description: REST adapter for GitLab API — alert_management. One Spectral-compliant resource per consumed operation, prefixed
      with /v1.
    resources:
    - path: /v1/api/v4/projects/{id}/alert-management-alerts/{alert-iid}/metric-images
      name: api-v4-projects-id-alert-management-alerts-alert-iid-metric-images
      description: REST surface for api-v4-projects-id-alert_management_alerts-alert_iid-metric_images.
      operations:
      - method: POST
        name: postapiv4projectsidalertmanagementalertsalertiidmetricimages
        description: Upload a metric image for an alert
        call: gitlab-ci-alert-management.postapiv4projectsidalertmanagementalertsalertiidmetricimages
        with:
          id: rest.id
          alert_iid: rest.alert_iid
          file: rest.file
          url: rest.url
          url_text: rest.url_text
        outputParameters:
        - type: object
          mapping: $.
      - method: GET
        name: getapiv4projectsidalertmanagementalertsalertiidmetricimages
        description: Metric Images for alert
        call: gitlab-ci-alert-management.getapiv4projectsidalertmanagementalertsalertiidmetricimages
        with:
          id: rest.id
          alert_iid: rest.alert_iid
        outputParameters:
        - type: object
          mapping: $.
    - path: /v1/api/v4/projects/{id}/alert-management-alerts/{alert-iid}/metric-images/authorize
      name: api-v4-projects-id-alert-management-alerts-alert-iid-metric-images-authorize
      description: REST surface for api-v4-projects-id-alert_management_alerts-alert_iid-metric_images-authorize.
      operations:
      - method: POST
        name: postapiv4projectsidalertmanagementalertsalertiidmetricimagesauthorize
        description: Workhorse authorize metric image file upload
        call: gitlab-ci-alert-management.postapiv4projectsidalertmanagementalertsalertiidmetricimagesauthorize
        with:
          id: rest.id
          alert_iid: rest.alert_iid
        outputParameters:
        - type: object
          mapping: $.
    - path: /v1/api/v4/projects/{id}/alert-management-alerts/{alert-iid}/metric-images/{metric-image-id}
      name: api-v4-projects-id-alert-management-alerts-alert-iid-metric-images-metric-image
      description: REST surface for api-v4-projects-id-alert_management_alerts-alert_iid-metric_images-metric_image_.
      operations:
      - method: PUT
        name: putapiv4projectsidalertmanagementalertsalertiidmetricimagesmetricimageid
        description: Update a metric image for an alert
        call: gitlab-ci-alert-management.putapiv4projectsidalertmanagementalertsalertiidmetricimagesmetricimageid
        with:
          id: rest.id
          alert_iid: rest.alert_iid
          metric_image_id: rest.metric_image_id
          url: rest.url
          url_text: rest.url_text
        outputParameters:
        - type: object
          mapping: $.
      - method: DELETE
        name: deleteapiv4projectsidalertmanagementalertsalertiidmetricimagesmetricimageid
        description: Remove a metric image for an alert
        call: gitlab-ci-alert-management.deleteapiv4projectsidalertmanagementalertsalertiidmetricimagesmetricimageid
        with:
          id: rest.id
          alert_iid: rest.alert_iid
          metric_image_id: rest.metric_image_id
        outputParameters:
        - type: object
          mapping: $.
  - type: mcp
    namespace: gitlab-ci-alert-management-mcp
    port: 9090
    transport: http
    description: MCP adapter for GitLab API — alert_management. One tool per consumed operation, routed inline through this
      capability's consumes block.
    tools:
    - name: upload-metric-image-alert
      description: Upload a metric image for an alert
      hints:
        readOnly: false
        destructive: false
        idempotent: false
      call: gitlab-ci-alert-management.postapiv4projectsidalertmanagementalertsalertiidmetricimages
      with:
        id: tools.id
        alert_iid: tools.alert_iid
        file: tools.file
        url: tools.url
        url_text: tools.url_text
      outputParameters:
      - type: object
        mapping: $.
    - name: metric-images-alert
      description: Metric Images for alert
      hints:
        readOnly: true
        destructive: false
        idempotent: true
      call: gitlab-ci-alert-management.getapiv4projectsidalertmanagementalertsalertiidmetricimages
      with:
        id: tools.id
        alert_iid: tools.alert_iid
      outputParameters:
      - type: object
        mapping: $.
    - name: workhorse-authorize-metric-image-file
      description: Workhorse authorize metric image file upload
      hints:
        readOnly: false
        destructive: false
        idempotent: false
      call: gitlab-ci-alert-management.postapiv4projectsidalertmanagementalertsalertiidmetricimagesauthorize
      with:
        id: tools.id
        alert_iid: tools.alert_iid
      outputParameters:
      - type: object
        mapping: $.
    - name: update-metric-image-alert
      description: Update a metric image for an alert
      hints:
        readOnly: false
        destructive: false
        idempotent: true
      call: gitlab-ci-alert-management.putapiv4projectsidalertmanagementalertsalertiidmetricimagesmetricimageid
      with:
        id: tools.id
        alert_iid: tools.alert_iid
        metric_image_id: tools.metric_image_id
        url: tools.url
        url_text: tools.url_text
      outputParameters:
      - type: object
        mapping: $.
    - name: remove-metric-image-alert
      description: Remove a metric image for an alert
      hints:
        readOnly: false
        destructive: true
        idempotent: true
      call: gitlab-ci-alert-management.deleteapiv4projectsidalertmanagementalertsalertiidmetricimagesmetricimageid
      with:
        id: tools.id
        alert_iid: tools.alert_iid
        metric_image_id: tools.metric_image_id
      outputParameters:
      - type: object
        mapping: $.