GitLab CI/CD · Capability

GitLab API — namespaces

GitLab API — namespaces. 8 operations. Lead operation: List namespaces. Self-contained Naftiko capability covering one Gitlab Ci business surface.

Run with Naftiko Gitlab Cinamespaces

What You Can Do

GET
Getapiv4namespaces — List namespaces
/v1/api/v4/namespaces
GET
Getapiv4namespacesstoragelimitexclusions — Retrieve all limit exclusions
/v1/api/v4/namespaces/storage/limit-exclusions
PUT
Putapiv4namespacesid — Update a namespace
/v1/api/v4/namespaces/{id}
GET
Getapiv4namespacesid — Get namespace by ID
/v1/api/v4/namespaces/{id}
GET
Getapiv4namespacesidexists — Get existence of a namespace
/v1/api/v4/namespaces/{id}/exists
GET
Getapiv4namespacesidgitlabsubscription — Returns the subscription for the namespace
/v1/api/v4/namespaces/{id}/gitlab-subscription
POST
Postapiv4namespacesidstoragelimitexclusion — Creates a storage limit exclusion for a Namespace
/v1/api/v4/namespaces/{id}/storage/limit-exclusion
DELETE
Deleteapiv4namespacesidstoragelimitexclusion — Removes a storage limit exclusion for a Namespace
/v1/api/v4/namespaces/{id}/storage/limit-exclusion

MCP Tools

list-namespaces

List namespaces

read-only idempotent
retrieve-all-limit-exclusions

Retrieve all limit exclusions

read-only idempotent
update-namespace

Update a namespace

idempotent
get-namespace-id

Get namespace by ID

read-only idempotent
get-existence-namespace

Get existence of a namespace

read-only idempotent
returns-subscription-namespace

Returns the subscription for the namespace

read-only idempotent
creates-storage-limit-exclusion-namespace

Creates a storage limit exclusion for a Namespace

removes-storage-limit-exclusion-namespace

Removes a storage limit exclusion for a Namespace

idempotent

Capability Spec

gitlab-ci-namespaces.yaml Raw ↑
naftiko: 1.0.0-alpha2
info:
  label: GitLab API — namespaces
  description: 'GitLab API — namespaces. 8 operations. Lead operation: List namespaces. Self-contained Naftiko capability
    covering one Gitlab Ci business surface.'
  tags:
  - Gitlab Ci
  - namespaces
  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-namespaces
    baseUri: https://gitlab.com
    description: GitLab API — namespaces business capability. Self-contained, no shared references.
    resources:
    - name: api-v4-namespaces
      path: /api/v4/namespaces
      operations:
      - name: getapiv4namespaces
        method: GET
        description: List namespaces
        outputRawFormat: json
        outputParameters:
        - name: result
          type: object
          value: $.
        inputParameters:
        - name: search
          in: query
          type: string
          description: Returns a list of namespaces the user is authorized to view based on the search criteria
        - name: owned_only
          in: query
          type: boolean
          description: In GitLab 14.2 and later, returns a list of owned namespaces only
        - name: top_level_only
          in: query
          type: boolean
          description: Only include top level namespaces
        - name: full_path_search
          in: query
          type: boolean
          description: If `true`, the `search` parameter is matched against the full path of the namespaces
        - name: page
          in: query
          type: integer
          description: Current page number
        - name: per_page
          in: query
          type: integer
          description: Number of items per page
        - name: requested_hosted_plan
          in: query
          type: string
          description: Name of the hosted plan requested by the customer
    - name: api-v4-namespaces-storage-limit_exclusions
      path: /api/v4/namespaces/storage/limit_exclusions
      operations:
      - name: getapiv4namespacesstoragelimitexclusions
        method: GET
        description: Retrieve all limit exclusions
        outputRawFormat: json
        outputParameters:
        - name: result
          type: object
          value: $.
        inputParameters:
        - name: page
          in: query
          type: integer
          description: Current page number
        - name: per_page
          in: query
          type: integer
          description: Number of items per page
    - name: api-v4-namespaces-id
      path: /api/v4/namespaces/{id}
      operations:
      - name: putapiv4namespacesid
        method: PUT
        description: Update a namespace
        outputRawFormat: json
        outputParameters:
        - name: result
          type: object
          value: $.
        inputParameters:
        - name: id
          in: path
          type: integer
          required: true
        - name: putApiV4NamespacesId
          in: body
          type: string
          required: true
      - name: getapiv4namespacesid
        method: GET
        description: Get namespace by ID
        outputRawFormat: json
        outputParameters:
        - name: result
          type: object
          value: $.
        inputParameters:
        - name: id
          in: path
          type: string
          description: ID or URL-encoded path of the namespace
          required: true
    - name: api-v4-namespaces-id-exists
      path: /api/v4/namespaces/{id}/exists
      operations:
      - name: getapiv4namespacesidexists
        method: GET
        description: Get existence of a namespace
        outputRawFormat: json
        outputParameters:
        - name: result
          type: object
          value: $.
        inputParameters:
        - name: id
          in: path
          type: string
          description: Namespace’s path
          required: true
        - name: parent_id
          in: query
          type: integer
          description: The ID of the parent namespace. If no ID is specified, only top-level namespaces are considered.
    - name: api-v4-namespaces-id-gitlab_subscription
      path: /api/v4/namespaces/{id}/gitlab_subscription
      operations:
      - name: getapiv4namespacesidgitlabsubscription
        method: GET
        description: Returns the subscription for the namespace
        outputRawFormat: json
        outputParameters:
        - name: result
          type: object
          value: $.
        inputParameters:
        - name: id
          in: path
          type: integer
          required: true
    - name: api-v4-namespaces-id-storage-limit_exclusion
      path: /api/v4/namespaces/{id}/storage/limit_exclusion
      operations:
      - name: postapiv4namespacesidstoragelimitexclusion
        method: POST
        description: Creates a storage limit exclusion for a Namespace
        outputRawFormat: json
        outputParameters:
        - name: result
          type: object
          value: $.
        inputParameters:
        - name: id
          in: path
          type: integer
          required: true
        - name: postApiV4NamespacesIdStorageLimitExclusion
          in: body
          type: string
          required: true
      - name: deleteapiv4namespacesidstoragelimitexclusion
        method: DELETE
        description: Removes a storage limit exclusion for a Namespace
        outputRawFormat: json
        outputParameters:
        - name: result
          type: object
          value: $.
        inputParameters:
        - name: id
          in: path
          type: integer
          required: true
  exposes:
  - type: rest
    namespace: gitlab-ci-namespaces-rest
    port: 8080
    description: REST adapter for GitLab API — namespaces. One Spectral-compliant resource per consumed operation, prefixed
      with /v1.
    resources:
    - path: /v1/api/v4/namespaces
      name: api-v4-namespaces
      description: REST surface for api-v4-namespaces.
      operations:
      - method: GET
        name: getapiv4namespaces
        description: List namespaces
        call: gitlab-ci-namespaces.getapiv4namespaces
        with:
          search: rest.search
          owned_only: rest.owned_only
          top_level_only: rest.top_level_only
          full_path_search: rest.full_path_search
          page: rest.page
          per_page: rest.per_page
          requested_hosted_plan: rest.requested_hosted_plan
        outputParameters:
        - type: object
          mapping: $.
    - path: /v1/api/v4/namespaces/storage/limit-exclusions
      name: api-v4-namespaces-storage-limit-exclusions
      description: REST surface for api-v4-namespaces-storage-limit_exclusions.
      operations:
      - method: GET
        name: getapiv4namespacesstoragelimitexclusions
        description: Retrieve all limit exclusions
        call: gitlab-ci-namespaces.getapiv4namespacesstoragelimitexclusions
        with:
          page: rest.page
          per_page: rest.per_page
        outputParameters:
        - type: object
          mapping: $.
    - path: /v1/api/v4/namespaces/{id}
      name: api-v4-namespaces-id
      description: REST surface for api-v4-namespaces-id.
      operations:
      - method: PUT
        name: putapiv4namespacesid
        description: Update a namespace
        call: gitlab-ci-namespaces.putapiv4namespacesid
        with:
          id: rest.id
          putApiV4NamespacesId: rest.putApiV4NamespacesId
        outputParameters:
        - type: object
          mapping: $.
      - method: GET
        name: getapiv4namespacesid
        description: Get namespace by ID
        call: gitlab-ci-namespaces.getapiv4namespacesid
        with:
          id: rest.id
        outputParameters:
        - type: object
          mapping: $.
    - path: /v1/api/v4/namespaces/{id}/exists
      name: api-v4-namespaces-id-exists
      description: REST surface for api-v4-namespaces-id-exists.
      operations:
      - method: GET
        name: getapiv4namespacesidexists
        description: Get existence of a namespace
        call: gitlab-ci-namespaces.getapiv4namespacesidexists
        with:
          id: rest.id
          parent_id: rest.parent_id
        outputParameters:
        - type: object
          mapping: $.
    - path: /v1/api/v4/namespaces/{id}/gitlab-subscription
      name: api-v4-namespaces-id-gitlab-subscription
      description: REST surface for api-v4-namespaces-id-gitlab_subscription.
      operations:
      - method: GET
        name: getapiv4namespacesidgitlabsubscription
        description: Returns the subscription for the namespace
        call: gitlab-ci-namespaces.getapiv4namespacesidgitlabsubscription
        with:
          id: rest.id
        outputParameters:
        - type: object
          mapping: $.
    - path: /v1/api/v4/namespaces/{id}/storage/limit-exclusion
      name: api-v4-namespaces-id-storage-limit-exclusion
      description: REST surface for api-v4-namespaces-id-storage-limit_exclusion.
      operations:
      - method: POST
        name: postapiv4namespacesidstoragelimitexclusion
        description: Creates a storage limit exclusion for a Namespace
        call: gitlab-ci-namespaces.postapiv4namespacesidstoragelimitexclusion
        with:
          id: rest.id
          postApiV4NamespacesIdStorageLimitExclusion: rest.postApiV4NamespacesIdStorageLimitExclusion
        outputParameters:
        - type: object
          mapping: $.
      - method: DELETE
        name: deleteapiv4namespacesidstoragelimitexclusion
        description: Removes a storage limit exclusion for a Namespace
        call: gitlab-ci-namespaces.deleteapiv4namespacesidstoragelimitexclusion
        with:
          id: rest.id
        outputParameters:
        - type: object
          mapping: $.
  - type: mcp
    namespace: gitlab-ci-namespaces-mcp
    port: 9090
    transport: http
    description: MCP adapter for GitLab API — namespaces. One tool per consumed operation, routed inline through this capability's
      consumes block.
    tools:
    - name: list-namespaces
      description: List namespaces
      hints:
        readOnly: true
        destructive: false
        idempotent: true
      call: gitlab-ci-namespaces.getapiv4namespaces
      with:
        search: tools.search
        owned_only: tools.owned_only
        top_level_only: tools.top_level_only
        full_path_search: tools.full_path_search
        page: tools.page
        per_page: tools.per_page
        requested_hosted_plan: tools.requested_hosted_plan
      outputParameters:
      - type: object
        mapping: $.
    - name: retrieve-all-limit-exclusions
      description: Retrieve all limit exclusions
      hints:
        readOnly: true
        destructive: false
        idempotent: true
      call: gitlab-ci-namespaces.getapiv4namespacesstoragelimitexclusions
      with:
        page: tools.page
        per_page: tools.per_page
      outputParameters:
      - type: object
        mapping: $.
    - name: update-namespace
      description: Update a namespace
      hints:
        readOnly: false
        destructive: false
        idempotent: true
      call: gitlab-ci-namespaces.putapiv4namespacesid
      with:
        id: tools.id
        putApiV4NamespacesId: tools.putApiV4NamespacesId
      outputParameters:
      - type: object
        mapping: $.
    - name: get-namespace-id
      description: Get namespace by ID
      hints:
        readOnly: true
        destructive: false
        idempotent: true
      call: gitlab-ci-namespaces.getapiv4namespacesid
      with:
        id: tools.id
      outputParameters:
      - type: object
        mapping: $.
    - name: get-existence-namespace
      description: Get existence of a namespace
      hints:
        readOnly: true
        destructive: false
        idempotent: true
      call: gitlab-ci-namespaces.getapiv4namespacesidexists
      with:
        id: tools.id
        parent_id: tools.parent_id
      outputParameters:
      - type: object
        mapping: $.
    - name: returns-subscription-namespace
      description: Returns the subscription for the namespace
      hints:
        readOnly: true
        destructive: false
        idempotent: true
      call: gitlab-ci-namespaces.getapiv4namespacesidgitlabsubscription
      with:
        id: tools.id
      outputParameters:
      - type: object
        mapping: $.
    - name: creates-storage-limit-exclusion-namespace
      description: Creates a storage limit exclusion for a Namespace
      hints:
        readOnly: false
        destructive: false
        idempotent: false
      call: gitlab-ci-namespaces.postapiv4namespacesidstoragelimitexclusion
      with:
        id: tools.id
        postApiV4NamespacesIdStorageLimitExclusion: tools.postApiV4NamespacesIdStorageLimitExclusion
      outputParameters:
      - type: object
        mapping: $.
    - name: removes-storage-limit-exclusion-namespace
      description: Removes a storage limit exclusion for a Namespace
      hints:
        readOnly: false
        destructive: true
        idempotent: true
      call: gitlab-ci-namespaces.deleteapiv4namespacesidstoragelimitexclusion
      with:
        id: tools.id
      outputParameters:
      - type: object
        mapping: $.