naftiko: 1.0.0-alpha2 info: label: GitLab API — badges description: 'GitLab API — badges. 12 operations. Lead operation: Gets a list of group badges viewable by the authenticated user.. Self-contained Naftiko capability covering one Gitlab Ci business surface.' tags: - Gitlab Ci - badges 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-badges baseUri: https://gitlab.com description: GitLab API — badges business capability. Self-contained, no shared references. resources: - name: api-v4-groups-id-badges path: /api/v4/groups/{id}/badges operations: - name: getapiv4groupsidbadges method: GET description: Gets a list of group badges viewable by the authenticated user. outputRawFormat: json outputParameters: - name: result type: object value: $. inputParameters: - name: id in: path type: string description: The ID or URL-encoded path of the group owned by the authenticated user. required: true - name: page in: query type: integer description: Current page number - name: per_page in: query type: integer description: Number of items per page - name: name in: query type: string description: Name for the badge - name: postapiv4groupsidbadges method: POST description: Adds a badge to a group. outputRawFormat: json outputParameters: - name: result type: object value: $. inputParameters: - name: id in: path type: string description: The ID or URL-encoded path of the group owned by the authenticated user. required: true - name: postApiV4GroupsIdBadges in: body type: string required: true - name: api-v4-groups-id-badges-render path: /api/v4/groups/{id}/badges/render operations: - name: getapiv4groupsidbadgesrender method: GET description: Preview a badge from a group. outputRawFormat: json outputParameters: - name: result type: object value: $. inputParameters: - name: id in: path type: string description: The ID or URL-encoded path of the group owned by the authenticated user. required: true - name: link_url in: query type: string description: URL of the badge link required: true - name: image_url in: query type: string description: URL of the badge image required: true - name: api-v4-groups-id-badges-badge_id path: /api/v4/groups/{id}/badges/{badge_id} operations: - name: getapiv4groupsidbadgesbadgeid method: GET description: Gets a badge of a group. outputRawFormat: json outputParameters: - name: result type: object value: $. inputParameters: - name: id in: path type: string description: The ID or URL-encoded path of the group owned by the authenticated user. required: true - name: badge_id in: path type: integer description: The badge ID required: true - name: putapiv4groupsidbadgesbadgeid method: PUT description: Updates a badge of a group. outputRawFormat: json outputParameters: - name: result type: object value: $. inputParameters: - name: id in: path type: string description: The ID or URL-encoded path of the group owned by the authenticated user. required: true - name: badge_id in: path type: integer required: true - name: putApiV4GroupsIdBadgesBadgeId in: body type: string required: true - name: deleteapiv4groupsidbadgesbadgeid method: DELETE description: Removes a badge from the group. outputRawFormat: json outputParameters: - name: result type: object value: $. inputParameters: - name: id in: path type: string description: The ID or URL-encoded path of the group owned by the authenticated user. required: true - name: badge_id in: path type: integer description: The badge ID required: true - name: api-v4-projects-id-badges path: /api/v4/projects/{id}/badges operations: - name: getapiv4projectsidbadges method: GET description: Gets a list of project badges viewable by the authenticated user. 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 owned by the authenticated user. required: true - name: page in: query type: integer description: Current page number - name: per_page in: query type: integer description: Number of items per page - name: name in: query type: string description: Name for the badge - name: postapiv4projectsidbadges method: POST description: Adds a badge to a project. 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 owned by the authenticated user. required: true - name: postApiV4ProjectsIdBadges in: body type: string required: true - name: api-v4-projects-id-badges-render path: /api/v4/projects/{id}/badges/render operations: - name: getapiv4projectsidbadgesrender method: GET description: Preview a badge from a project. 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 owned by the authenticated user. required: true - name: link_url in: query type: string description: URL of the badge link required: true - name: image_url in: query type: string description: URL of the badge image required: true - name: api-v4-projects-id-badges-badge_id path: /api/v4/projects/{id}/badges/{badge_id} operations: - name: getapiv4projectsidbadgesbadgeid method: GET description: Gets a badge of a project. 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 owned by the authenticated user. required: true - name: badge_id in: path type: integer description: The badge ID required: true - name: putapiv4projectsidbadgesbadgeid method: PUT description: Updates a badge of a project. 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 owned by the authenticated user. required: true - name: badge_id in: path type: integer required: true - name: putApiV4ProjectsIdBadgesBadgeId in: body type: string required: true - name: deleteapiv4projectsidbadgesbadgeid method: DELETE description: Removes a badge from the project. 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 owned by the authenticated user. required: true - name: badge_id in: path type: integer description: The badge ID required: true exposes: - type: rest namespace: gitlab-ci-badges-rest port: 8080 description: REST adapter for GitLab API — badges. One Spectral-compliant resource per consumed operation, prefixed with /v1. resources: - path: /v1/api/v4/groups/{id}/badges name: api-v4-groups-id-badges description: REST surface for api-v4-groups-id-badges. operations: - method: GET name: getapiv4groupsidbadges description: Gets a list of group badges viewable by the authenticated user. call: gitlab-ci-badges.getapiv4groupsidbadges with: id: rest.id page: rest.page per_page: rest.per_page name: rest.name outputParameters: - type: object mapping: $. - method: POST name: postapiv4groupsidbadges description: Adds a badge to a group. call: gitlab-ci-badges.postapiv4groupsidbadges with: id: rest.id postApiV4GroupsIdBadges: rest.postApiV4GroupsIdBadges outputParameters: - type: object mapping: $. - path: /v1/api/v4/groups/{id}/badges/render name: api-v4-groups-id-badges-render description: REST surface for api-v4-groups-id-badges-render. operations: - method: GET name: getapiv4groupsidbadgesrender description: Preview a badge from a group. call: gitlab-ci-badges.getapiv4groupsidbadgesrender with: id: rest.id link_url: rest.link_url image_url: rest.image_url outputParameters: - type: object mapping: $. - path: /v1/api/v4/groups/{id}/badges/{badge-id} name: api-v4-groups-id-badges-badge-id description: REST surface for api-v4-groups-id-badges-badge_id. operations: - method: GET name: getapiv4groupsidbadgesbadgeid description: Gets a badge of a group. call: gitlab-ci-badges.getapiv4groupsidbadgesbadgeid with: id: rest.id badge_id: rest.badge_id outputParameters: - type: object mapping: $. - method: PUT name: putapiv4groupsidbadgesbadgeid description: Updates a badge of a group. call: gitlab-ci-badges.putapiv4groupsidbadgesbadgeid with: id: rest.id badge_id: rest.badge_id putApiV4GroupsIdBadgesBadgeId: rest.putApiV4GroupsIdBadgesBadgeId outputParameters: - type: object mapping: $. - method: DELETE name: deleteapiv4groupsidbadgesbadgeid description: Removes a badge from the group. call: gitlab-ci-badges.deleteapiv4groupsidbadgesbadgeid with: id: rest.id badge_id: rest.badge_id outputParameters: - type: object mapping: $. - path: /v1/api/v4/projects/{id}/badges name: api-v4-projects-id-badges description: REST surface for api-v4-projects-id-badges. operations: - method: GET name: getapiv4projectsidbadges description: Gets a list of project badges viewable by the authenticated user. call: gitlab-ci-badges.getapiv4projectsidbadges with: id: rest.id page: rest.page per_page: rest.per_page name: rest.name outputParameters: - type: object mapping: $. - method: POST name: postapiv4projectsidbadges description: Adds a badge to a project. call: gitlab-ci-badges.postapiv4projectsidbadges with: id: rest.id postApiV4ProjectsIdBadges: rest.postApiV4ProjectsIdBadges outputParameters: - type: object mapping: $. - path: /v1/api/v4/projects/{id}/badges/render name: api-v4-projects-id-badges-render description: REST surface for api-v4-projects-id-badges-render. operations: - method: GET name: getapiv4projectsidbadgesrender description: Preview a badge from a project. call: gitlab-ci-badges.getapiv4projectsidbadgesrender with: id: rest.id link_url: rest.link_url image_url: rest.image_url outputParameters: - type: object mapping: $. - path: /v1/api/v4/projects/{id}/badges/{badge-id} name: api-v4-projects-id-badges-badge-id description: REST surface for api-v4-projects-id-badges-badge_id. operations: - method: GET name: getapiv4projectsidbadgesbadgeid description: Gets a badge of a project. call: gitlab-ci-badges.getapiv4projectsidbadgesbadgeid with: id: rest.id badge_id: rest.badge_id outputParameters: - type: object mapping: $. - method: PUT name: putapiv4projectsidbadgesbadgeid description: Updates a badge of a project. call: gitlab-ci-badges.putapiv4projectsidbadgesbadgeid with: id: rest.id badge_id: rest.badge_id putApiV4ProjectsIdBadgesBadgeId: rest.putApiV4ProjectsIdBadgesBadgeId outputParameters: - type: object mapping: $. - method: DELETE name: deleteapiv4projectsidbadgesbadgeid description: Removes a badge from the project. call: gitlab-ci-badges.deleteapiv4projectsidbadgesbadgeid with: id: rest.id badge_id: rest.badge_id outputParameters: - type: object mapping: $. - type: mcp namespace: gitlab-ci-badges-mcp port: 9090 transport: http description: MCP adapter for GitLab API — badges. One tool per consumed operation, routed inline through this capability's consumes block. tools: - name: gets-list-group-badges-viewable description: Gets a list of group badges viewable by the authenticated user. hints: readOnly: true destructive: false idempotent: true call: gitlab-ci-badges.getapiv4groupsidbadges with: id: tools.id page: tools.page per_page: tools.per_page name: tools.name outputParameters: - type: object mapping: $. - name: adds-badge-group description: Adds a badge to a group. hints: readOnly: false destructive: false idempotent: false call: gitlab-ci-badges.postapiv4groupsidbadges with: id: tools.id postApiV4GroupsIdBadges: tools.postApiV4GroupsIdBadges outputParameters: - type: object mapping: $. - name: preview-badge-group description: Preview a badge from a group. hints: readOnly: true destructive: false idempotent: true call: gitlab-ci-badges.getapiv4groupsidbadgesrender with: id: tools.id link_url: tools.link_url image_url: tools.image_url outputParameters: - type: object mapping: $. - name: gets-badge-group description: Gets a badge of a group. hints: readOnly: true destructive: false idempotent: true call: gitlab-ci-badges.getapiv4groupsidbadgesbadgeid with: id: tools.id badge_id: tools.badge_id outputParameters: - type: object mapping: $. - name: updates-badge-group description: Updates a badge of a group. hints: readOnly: false destructive: false idempotent: true call: gitlab-ci-badges.putapiv4groupsidbadgesbadgeid with: id: tools.id badge_id: tools.badge_id putApiV4GroupsIdBadgesBadgeId: tools.putApiV4GroupsIdBadgesBadgeId outputParameters: - type: object mapping: $. - name: removes-badge-group description: Removes a badge from the group. hints: readOnly: false destructive: true idempotent: true call: gitlab-ci-badges.deleteapiv4groupsidbadgesbadgeid with: id: tools.id badge_id: tools.badge_id outputParameters: - type: object mapping: $. - name: gets-list-project-badges-viewable description: Gets a list of project badges viewable by the authenticated user. hints: readOnly: true destructive: false idempotent: true call: gitlab-ci-badges.getapiv4projectsidbadges with: id: tools.id page: tools.page per_page: tools.per_page name: tools.name outputParameters: - type: object mapping: $. - name: adds-badge-project description: Adds a badge to a project. hints: readOnly: false destructive: false idempotent: false call: gitlab-ci-badges.postapiv4projectsidbadges with: id: tools.id postApiV4ProjectsIdBadges: tools.postApiV4ProjectsIdBadges outputParameters: - type: object mapping: $. - name: preview-badge-project description: Preview a badge from a project. hints: readOnly: true destructive: false idempotent: true call: gitlab-ci-badges.getapiv4projectsidbadgesrender with: id: tools.id link_url: tools.link_url image_url: tools.image_url outputParameters: - type: object mapping: $. - name: gets-badge-project description: Gets a badge of a project. hints: readOnly: true destructive: false idempotent: true call: gitlab-ci-badges.getapiv4projectsidbadgesbadgeid with: id: tools.id badge_id: tools.badge_id outputParameters: - type: object mapping: $. - name: updates-badge-project description: Updates a badge of a project. hints: readOnly: false destructive: false idempotent: true call: gitlab-ci-badges.putapiv4projectsidbadgesbadgeid with: id: tools.id badge_id: tools.badge_id putApiV4ProjectsIdBadgesBadgeId: tools.putApiV4ProjectsIdBadgesBadgeId outputParameters: - type: object mapping: $. - name: removes-badge-project description: Removes a badge from the project. hints: readOnly: false destructive: true idempotent: true call: gitlab-ci-badges.deleteapiv4projectsidbadgesbadgeid with: id: tools.id badge_id: tools.badge_id outputParameters: - type: object mapping: $.