naftiko: 1.0.0-alpha2 info: label: GitLab API — draft_notes description: 'GitLab API — draft_notes. 7 operations. Lead operation: draft_notes. Self-contained Naftiko capability covering one Gitlab Ci business surface.' tags: - Gitlab Ci - draft_notes 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-draft-notes baseUri: https://gitlab.com description: GitLab API — draft_notes business capability. Self-contained, no shared references. resources: - name: api-v4-projects-id-merge_requests-merge_request_iid-draft_notes path: /api/v4/projects/{id}/merge_requests/{merge_request_iid}/draft_notes operations: - name: getapiv4projectsidmergerequestsmergerequestiiddraftnotes method: GET description: Get a list of merge request draft notes outputRawFormat: json outputParameters: - name: result type: object value: $. inputParameters: - name: id in: path type: string description: The ID of a project required: true - name: merge_request_iid in: path type: integer description: The ID of a merge request required: true - name: postapiv4projectsidmergerequestsmergerequestiiddraftnotes method: POST description: Create a new draft note outputRawFormat: json outputParameters: - name: result type: object value: $. inputParameters: - name: id in: path type: string description: The ID of a project. required: true - name: merge_request_iid in: path type: integer description: The ID of a merge request. required: true - name: postApiV4ProjectsIdMergeRequestsMergeRequestIidDraftNotes in: body type: string required: true - name: api-v4-projects-id-merge_requests-merge_request_iid-draft_notes-bulk_publish path: /api/v4/projects/{id}/merge_requests/{merge_request_iid}/draft_notes/bulk_publish operations: - name: postapiv4projectsidmergerequestsmergerequestiiddraftnotesbulkpublish method: POST description: Bulk publish all pending draft notes outputRawFormat: json outputParameters: - name: result type: object value: $. inputParameters: - name: id in: path type: string description: The ID of a project required: true - name: merge_request_iid in: path type: integer description: The ID of a merge request required: true - name: api-v4-projects-id-merge_requests-merge_request_iid-draft_notes-draft_note_id path: /api/v4/projects/{id}/merge_requests/{merge_request_iid}/draft_notes/{draft_note_id} operations: - name: getapiv4projectsidmergerequestsmergerequestiiddraftnotesdraftnoteid method: GET description: Get a single draft note outputRawFormat: json outputParameters: - name: result type: object value: $. inputParameters: - name: id in: path type: string description: The ID of a project required: true - name: merge_request_iid in: path type: integer description: The ID of a merge request required: true - name: draft_note_id in: path type: integer description: The ID of a draft note required: true - name: putapiv4projectsidmergerequestsmergerequestiiddraftnotesdraftnoteid method: PUT description: Modify an existing draft note outputRawFormat: json outputParameters: - name: result type: object value: $. inputParameters: - name: id in: path type: string description: The ID of a project. required: true - name: merge_request_iid in: path type: integer description: The ID of a merge request. required: true - name: draft_note_id in: path type: integer description: The ID of a draft note required: true - name: putApiV4ProjectsIdMergeRequestsMergeRequestIidDraftNotesDraftNoteId in: body type: string required: true - name: deleteapiv4projectsidmergerequestsmergerequestiiddraftnotesdraftnoteid method: DELETE description: Delete a draft note outputRawFormat: json outputParameters: - name: result type: object value: $. inputParameters: - name: id in: path type: string description: The ID of a project required: true - name: merge_request_iid in: path type: integer description: The ID of a merge request required: true - name: draft_note_id in: path type: integer description: The ID of a draft note required: true - name: api-v4-projects-id-merge_requests-merge_request_iid-draft_notes-draft_note_id-pu path: /api/v4/projects/{id}/merge_requests/{merge_request_iid}/draft_notes/{draft_note_id}/publish operations: - name: putapiv4projectsidmergerequestsmergerequestiiddraftnotesdraftnoteidpublish method: PUT description: Publish a pending draft note outputRawFormat: json outputParameters: - name: result type: object value: $. inputParameters: - name: id in: path type: string description: The ID of a project required: true - name: merge_request_iid in: path type: integer description: The ID of a merge request required: true - name: draft_note_id in: path type: integer description: The ID of a draft note required: true exposes: - type: rest namespace: gitlab-ci-draft-notes-rest port: 8080 description: REST adapter for GitLab API — draft_notes. One Spectral-compliant resource per consumed operation, prefixed with /v1. resources: - path: /v1/api/v4/projects/{id}/merge-requests/{merge-request-iid}/draft-notes name: api-v4-projects-id-merge-requests-merge-request-iid-draft-notes description: REST surface for api-v4-projects-id-merge_requests-merge_request_iid-draft_notes. operations: - method: GET name: getapiv4projectsidmergerequestsmergerequestiiddraftnotes description: Get a list of merge request draft notes call: gitlab-ci-draft-notes.getapiv4projectsidmergerequestsmergerequestiiddraftnotes with: id: rest.id merge_request_iid: rest.merge_request_iid outputParameters: - type: object mapping: $. - method: POST name: postapiv4projectsidmergerequestsmergerequestiiddraftnotes description: Create a new draft note call: gitlab-ci-draft-notes.postapiv4projectsidmergerequestsmergerequestiiddraftnotes with: id: rest.id merge_request_iid: rest.merge_request_iid postApiV4ProjectsIdMergeRequestsMergeRequestIidDraftNotes: rest.postApiV4ProjectsIdMergeRequestsMergeRequestIidDraftNotes outputParameters: - type: object mapping: $. - path: /v1/api/v4/projects/{id}/merge-requests/{merge-request-iid}/draft-notes/bulk-publish name: api-v4-projects-id-merge-requests-merge-request-iid-draft-notes-bulk-publish description: REST surface for api-v4-projects-id-merge_requests-merge_request_iid-draft_notes-bulk_publish. operations: - method: POST name: postapiv4projectsidmergerequestsmergerequestiiddraftnotesbulkpublish description: Bulk publish all pending draft notes call: gitlab-ci-draft-notes.postapiv4projectsidmergerequestsmergerequestiiddraftnotesbulkpublish with: id: rest.id merge_request_iid: rest.merge_request_iid outputParameters: - type: object mapping: $. - path: /v1/api/v4/projects/{id}/merge-requests/{merge-request-iid}/draft-notes/{draft-note-id} name: api-v4-projects-id-merge-requests-merge-request-iid-draft-notes-draft-note-id description: REST surface for api-v4-projects-id-merge_requests-merge_request_iid-draft_notes-draft_note_id. operations: - method: GET name: getapiv4projectsidmergerequestsmergerequestiiddraftnotesdraftnoteid description: Get a single draft note call: gitlab-ci-draft-notes.getapiv4projectsidmergerequestsmergerequestiiddraftnotesdraftnoteid with: id: rest.id merge_request_iid: rest.merge_request_iid draft_note_id: rest.draft_note_id outputParameters: - type: object mapping: $. - method: PUT name: putapiv4projectsidmergerequestsmergerequestiiddraftnotesdraftnoteid description: Modify an existing draft note call: gitlab-ci-draft-notes.putapiv4projectsidmergerequestsmergerequestiiddraftnotesdraftnoteid with: id: rest.id merge_request_iid: rest.merge_request_iid draft_note_id: rest.draft_note_id putApiV4ProjectsIdMergeRequestsMergeRequestIidDraftNotesDraftNoteId: rest.putApiV4ProjectsIdMergeRequestsMergeRequestIidDraftNotesDraftNoteId outputParameters: - type: object mapping: $. - method: DELETE name: deleteapiv4projectsidmergerequestsmergerequestiiddraftnotesdraftnoteid description: Delete a draft note call: gitlab-ci-draft-notes.deleteapiv4projectsidmergerequestsmergerequestiiddraftnotesdraftnoteid with: id: rest.id merge_request_iid: rest.merge_request_iid draft_note_id: rest.draft_note_id outputParameters: - type: object mapping: $. - path: /v1/api/v4/projects/{id}/merge-requests/{merge-request-iid}/draft-notes/{draft-note-id}/publish name: api-v4-projects-id-merge-requests-merge-request-iid-draft-notes-draft-note-id-pu description: REST surface for api-v4-projects-id-merge_requests-merge_request_iid-draft_notes-draft_note_id-pu. operations: - method: PUT name: putapiv4projectsidmergerequestsmergerequestiiddraftnotesdraftnoteidpublish description: Publish a pending draft note call: gitlab-ci-draft-notes.putapiv4projectsidmergerequestsmergerequestiiddraftnotesdraftnoteidpublish with: id: rest.id merge_request_iid: rest.merge_request_iid draft_note_id: rest.draft_note_id outputParameters: - type: object mapping: $. - type: mcp namespace: gitlab-ci-draft-notes-mcp port: 9090 transport: http description: MCP adapter for GitLab API — draft_notes. One tool per consumed operation, routed inline through this capability's consumes block. tools: - name: get-list-merge-request-draft description: Get a list of merge request draft notes hints: readOnly: true destructive: false idempotent: true call: gitlab-ci-draft-notes.getapiv4projectsidmergerequestsmergerequestiiddraftnotes with: id: tools.id merge_request_iid: tools.merge_request_iid outputParameters: - type: object mapping: $. - name: create-new-draft-note description: Create a new draft note hints: readOnly: false destructive: false idempotent: false call: gitlab-ci-draft-notes.postapiv4projectsidmergerequestsmergerequestiiddraftnotes with: id: tools.id merge_request_iid: tools.merge_request_iid postApiV4ProjectsIdMergeRequestsMergeRequestIidDraftNotes: tools.postApiV4ProjectsIdMergeRequestsMergeRequestIidDraftNotes outputParameters: - type: object mapping: $. - name: bulk-publish-all-pending-draft description: Bulk publish all pending draft notes hints: readOnly: false destructive: false idempotent: false call: gitlab-ci-draft-notes.postapiv4projectsidmergerequestsmergerequestiiddraftnotesbulkpublish with: id: tools.id merge_request_iid: tools.merge_request_iid outputParameters: - type: object mapping: $. - name: get-single-draft-note description: Get a single draft note hints: readOnly: true destructive: false idempotent: true call: gitlab-ci-draft-notes.getapiv4projectsidmergerequestsmergerequestiiddraftnotesdraftnoteid with: id: tools.id merge_request_iid: tools.merge_request_iid draft_note_id: tools.draft_note_id outputParameters: - type: object mapping: $. - name: modify-existing-draft-note description: Modify an existing draft note hints: readOnly: false destructive: false idempotent: true call: gitlab-ci-draft-notes.putapiv4projectsidmergerequestsmergerequestiiddraftnotesdraftnoteid with: id: tools.id merge_request_iid: tools.merge_request_iid draft_note_id: tools.draft_note_id putApiV4ProjectsIdMergeRequestsMergeRequestIidDraftNotesDraftNoteId: tools.putApiV4ProjectsIdMergeRequestsMergeRequestIidDraftNotesDraftNoteId outputParameters: - type: object mapping: $. - name: delete-draft-note description: Delete a draft note hints: readOnly: false destructive: true idempotent: true call: gitlab-ci-draft-notes.deleteapiv4projectsidmergerequestsmergerequestiiddraftnotesdraftnoteid with: id: tools.id merge_request_iid: tools.merge_request_iid draft_note_id: tools.draft_note_id outputParameters: - type: object mapping: $. - name: publish-pending-draft-note description: Publish a pending draft note hints: readOnly: false destructive: false idempotent: true call: gitlab-ci-draft-notes.putapiv4projectsidmergerequestsmergerequestiiddraftnotesdraftnoteidpublish with: id: tools.id merge_request_iid: tools.merge_request_iid draft_note_id: tools.draft_note_id outputParameters: - type: object mapping: $.