naftiko: 1.0.0-alpha2 info: label: Bitbucket API — Commits description: 'Bitbucket API — Commits. 25 operations. Lead operation: Get a commit. Self-contained Naftiko capability covering one Bitbucket Pipelines business surface.' tags: - Bitbucket Pipelines - Commits created: '2026-05-19' modified: '2026-05-19' binds: - namespace: env keys: BITBUCKET_PIPELINES_API_KEY: BITBUCKET_PIPELINES_API_KEY capability: consumes: - type: http namespace: bitbucket-pipelines-commits baseUri: https://api.bitbucket.org/2.0 description: Bitbucket API — Commits business capability. Self-contained, no shared references. resources: - name: repositories-workspace-repo_slug-commit-commit path: /repositories/{workspace}/{repo_slug}/commit/{commit} operations: - name: get method: GET description: Get a commit outputRawFormat: json outputParameters: - name: result type: object value: $. - name: repositories-workspace-repo_slug-commit-commit-approve path: /repositories/{workspace}/{repo_slug}/commit/{commit}/approve operations: - name: delete method: DELETE description: Unapprove a commit outputRawFormat: json outputParameters: - name: result type: object value: $. - name: post method: POST description: Approve a commit outputRawFormat: json outputParameters: - name: result type: object value: $. - name: repositories-workspace-repo_slug-commit-commit-comments path: /repositories/{workspace}/{repo_slug}/commit/{commit}/comments operations: - name: get method: GET description: List a commit's comments outputRawFormat: json outputParameters: - name: result type: object value: $. inputParameters: - name: q in: query type: string description: Query string to narrow down the response as per - name: sort in: query type: string description: Field by which the results should be sorted as per - name: post method: POST description: Create comment for a commit outputRawFormat: json outputParameters: - name: result type: object value: $. inputParameters: - name: _body in: body type: string description: The specified comment. required: true - name: repositories-workspace-repo_slug-commit-commit-comments-comment_id path: /repositories/{workspace}/{repo_slug}/commit/{commit}/comments/{comment_id} operations: - name: delete method: DELETE description: Delete a commit comment outputRawFormat: json outputParameters: - name: result type: object value: $. - name: get method: GET description: Get a commit comment outputRawFormat: json outputParameters: - name: result type: object value: $. - name: put method: PUT description: Update a commit comment outputRawFormat: json outputParameters: - name: result type: object value: $. inputParameters: - name: _body in: body type: string description: The updated comment. required: true - name: repositories-workspace-repo_slug-commit-commit-reports path: /repositories/{workspace}/{repo_slug}/commit/{commit}/reports operations: - name: getreportsforcommit method: GET description: List reports outputRawFormat: json outputParameters: - name: result type: object value: $. inputParameters: - name: workspace in: path type: string description: This can either be the workspace ID (slug) or the workspace UUID surrounded by curly-braces, for example `{workspace UUID}`. required: true - name: repo_slug in: path type: string description: The repository. required: true - name: commit in: path type: string description: The commit for which to retrieve reports. required: true - name: repositories-workspace-repo_slug-commit-commit-reports-reportId path: /repositories/{workspace}/{repo_slug}/commit/{commit}/reports/{reportId} operations: - name: createorupdatereport method: PUT description: Create or update a report outputRawFormat: json outputParameters: - name: result type: object value: $. inputParameters: - name: workspace in: path type: string description: This can either be the workspace ID (slug) or the workspace UUID surrounded by curly-braces, for example `{workspace UUID}`. required: true - name: repo_slug in: path type: string description: The repository. required: true - name: commit in: path type: string description: The commit the report belongs to. required: true - name: reportId in: path type: string description: Either the uuid or external-id of the report. required: true - name: _body in: body type: string description: The report to create or update required: true - name: getreport method: GET description: Get a report outputRawFormat: json outputParameters: - name: result type: object value: $. inputParameters: - name: workspace in: path type: string description: This can either be the workspace ID (slug) or the workspace UUID surrounded by curly-braces, for example `{workspace UUID}`. required: true - name: repo_slug in: path type: string description: The repository. required: true - name: commit in: path type: string description: The commit the report belongs to. required: true - name: reportId in: path type: string description: Either the uuid or external-id of the report. required: true - name: deletereport method: DELETE description: Delete a report outputRawFormat: json outputParameters: - name: result type: object value: $. inputParameters: - name: workspace in: path type: string description: This can either be the workspace ID (slug) or the workspace UUID surrounded by curly-braces, for example `{workspace UUID}`. required: true - name: repo_slug in: path type: string description: The repository. required: true - name: commit in: path type: string description: The commit the report belongs to. required: true - name: reportId in: path type: string description: Either the uuid or external-id of the report. required: true - name: repositories-workspace-repo_slug-commit-commit-reports-reportId-annotations path: /repositories/{workspace}/{repo_slug}/commit/{commit}/reports/{reportId}/annotations operations: - name: getannotationsforreport method: GET description: List annotations outputRawFormat: json outputParameters: - name: result type: object value: $. inputParameters: - name: workspace in: path type: string description: This can either be the workspace ID (slug) or the workspace UUID surrounded by curly-braces, for example `{workspace UUID}`. required: true - name: repo_slug in: path type: string description: The repository. required: true - name: commit in: path type: string description: The commit for which to retrieve reports. required: true - name: reportId in: path type: string description: Uuid or external-if of the report for which to get annotations for. required: true - name: bulkcreateorupdateannotations method: POST description: Bulk create or update annotations outputRawFormat: json outputParameters: - name: result type: object value: $. inputParameters: - name: workspace in: path type: string description: This can either be the workspace ID (slug) or the workspace UUID surrounded by curly-braces, for example `{workspace UUID}`. required: true - name: repo_slug in: path type: string description: The repository. required: true - name: commit in: path type: string description: The commit for which to retrieve reports. required: true - name: reportId in: path type: string description: Uuid or external-if of the report for which to get annotations for. required: true - name: _body in: body type: array description: The annotations to create or update required: true - name: repositories-workspace-repo_slug-commit-commit-reports-reportId-annotations-anno path: /repositories/{workspace}/{repo_slug}/commit/{commit}/reports/{reportId}/annotations/{annotationId} operations: - name: getannotation method: GET description: Get an annotation outputRawFormat: json outputParameters: - name: result type: object value: $. inputParameters: - name: workspace in: path type: string description: This can either be the workspace ID (slug) or the workspace UUID surrounded by curly-braces, for example `{workspace UUID}`. required: true - name: repo_slug in: path type: string description: The repository. required: true - name: commit in: path type: string description: The commit the report belongs to. required: true - name: reportId in: path type: string description: Either the uuid or external-id of the report. required: true - name: annotationId in: path type: string description: Either the uuid or external-id of the annotation. required: true - name: createorupdateannotation method: PUT description: Create or update an annotation outputRawFormat: json outputParameters: - name: result type: object value: $. inputParameters: - name: workspace in: path type: string description: This can either be the workspace ID (slug) or the workspace UUID surrounded by curly-braces, for example `{workspace UUID}`. required: true - name: repo_slug in: path type: string description: The repository. required: true - name: commit in: path type: string description: The commit the report belongs to. required: true - name: reportId in: path type: string description: Either the uuid or external-id of the report. required: true - name: annotationId in: path type: string description: Either the uuid or external-id of the annotation. required: true - name: _body in: body type: string description: The annotation to create or update required: true - name: deleteannotation method: DELETE description: Delete an annotation outputRawFormat: json outputParameters: - name: result type: object value: $. inputParameters: - name: workspace in: path type: string description: This can either be the workspace ID (slug) or the workspace UUID surrounded by curly-braces, for example `{workspace UUID}`. required: true - name: repo_slug in: path type: string description: The repository. required: true - name: commit in: path type: string description: The commit the annotation belongs to. required: true - name: reportId in: path type: string description: Either the uuid or external-id of the annotation. required: true - name: annotationId in: path type: string description: Either the uuid or external-id of the annotation. required: true - name: repositories-workspace-repo_slug-commits path: /repositories/{workspace}/{repo_slug}/commits operations: - name: get method: GET description: List commits outputRawFormat: json outputParameters: - name: result type: object value: $. - name: post method: POST description: List commits with include/exclude outputRawFormat: json outputParameters: - name: result type: object value: $. - name: repositories-workspace-repo_slug-commits-revision path: /repositories/{workspace}/{repo_slug}/commits/{revision} operations: - name: get method: GET description: List commits for revision outputRawFormat: json outputParameters: - name: result type: object value: $. - name: post method: POST description: List commits for revision using include/exclude outputRawFormat: json outputParameters: - name: result type: object value: $. - name: repositories-workspace-repo_slug-diff-spec path: /repositories/{workspace}/{repo_slug}/diff/{spec} operations: - name: get method: GET description: Compare two commits outputRawFormat: json outputParameters: - name: result type: object value: $. inputParameters: - name: context in: query type: integer description: Generate diffs with lines of context instead of the usual three. - name: path in: query type: string description: Limit the diff to a particular file (this parameter - name: ignore_whitespace in: query type: boolean description: Generate diffs that ignore whitespace. - name: binary in: query type: boolean description: Generate diffs that include binary files, true if omitted. - name: renames in: query type: boolean description: Whether to perform rename detection, true if omitted. - name: merge in: query type: boolean description: This parameter is deprecated. The 'topic' parameter should be used - name: topic in: query type: boolean description: If true, returns 2-way 'three-dot' diff. - name: repositories-workspace-repo_slug-diffstat-spec path: /repositories/{workspace}/{repo_slug}/diffstat/{spec} operations: - name: get method: GET description: Compare two commit diff stats outputRawFormat: json outputParameters: - name: result type: object value: $. - name: repositories-workspace-repo_slug-merge-base-revspec path: /repositories/{workspace}/{repo_slug}/merge-base/{revspec} operations: - name: get method: GET description: Get the common ancestor between two commits outputRawFormat: json outputParameters: - name: result type: object value: $. - name: repositories-workspace-repo_slug-patch-spec path: /repositories/{workspace}/{repo_slug}/patch/{spec} operations: - name: get method: GET description: Get a patch for two commits outputRawFormat: json outputParameters: - name: result type: object value: $. exposes: - type: rest namespace: bitbucket-pipelines-commits-rest port: 8080 description: REST adapter for Bitbucket API — Commits. One Spectral-compliant resource per consumed operation, prefixed with /v1. resources: - path: /v1/repositories/{workspace}/{repo-slug}/commit/{commit} name: repositories-workspace-repo-slug-commit-commit description: REST surface for repositories-workspace-repo_slug-commit-commit. operations: - method: GET name: get description: Get a commit call: bitbucket-pipelines-commits.get outputParameters: - type: object mapping: $. - path: /v1/repositories/{workspace}/{repo-slug}/commit/{commit}/approve name: repositories-workspace-repo-slug-commit-commit-approve description: REST surface for repositories-workspace-repo_slug-commit-commit-approve. operations: - method: DELETE name: delete description: Unapprove a commit call: bitbucket-pipelines-commits.delete outputParameters: - type: object mapping: $. - method: POST name: post description: Approve a commit call: bitbucket-pipelines-commits.post outputParameters: - type: object mapping: $. - path: /v1/repositories/{workspace}/{repo-slug}/commit/{commit}/comments name: repositories-workspace-repo-slug-commit-commit-comments description: REST surface for repositories-workspace-repo_slug-commit-commit-comments. operations: - method: GET name: get description: List a commit's comments call: bitbucket-pipelines-commits.get with: q: rest.q sort: rest.sort outputParameters: - type: object mapping: $. - method: POST name: post description: Create comment for a commit call: bitbucket-pipelines-commits.post with: _body: rest._body outputParameters: - type: object mapping: $. - path: /v1/repositories/{workspace}/{repo-slug}/commit/{commit}/comments/{comment-id} name: repositories-workspace-repo-slug-commit-commit-comments-comment-id description: REST surface for repositories-workspace-repo_slug-commit-commit-comments-comment_id. operations: - method: DELETE name: delete description: Delete a commit comment call: bitbucket-pipelines-commits.delete outputParameters: - type: object mapping: $. - method: GET name: get description: Get a commit comment call: bitbucket-pipelines-commits.get outputParameters: - type: object mapping: $. - method: PUT name: put description: Update a commit comment call: bitbucket-pipelines-commits.put with: _body: rest._body outputParameters: - type: object mapping: $. - path: /v1/repositories/{workspace}/{repo-slug}/commit/{commit}/reports name: repositories-workspace-repo-slug-commit-commit-reports description: REST surface for repositories-workspace-repo_slug-commit-commit-reports. operations: - method: GET name: getreportsforcommit description: List reports call: bitbucket-pipelines-commits.getreportsforcommit with: workspace: rest.workspace repo_slug: rest.repo_slug commit: rest.commit outputParameters: - type: object mapping: $. - path: /v1/repositories/{workspace}/{repo-slug}/commit/{commit}/reports/{reportid} name: repositories-workspace-repo-slug-commit-commit-reports-reportid description: REST surface for repositories-workspace-repo_slug-commit-commit-reports-reportId. operations: - method: PUT name: createorupdatereport description: Create or update a report call: bitbucket-pipelines-commits.createorupdatereport with: workspace: rest.workspace repo_slug: rest.repo_slug commit: rest.commit reportId: rest.reportId _body: rest._body outputParameters: - type: object mapping: $. - method: GET name: getreport description: Get a report call: bitbucket-pipelines-commits.getreport with: workspace: rest.workspace repo_slug: rest.repo_slug commit: rest.commit reportId: rest.reportId outputParameters: - type: object mapping: $. - method: DELETE name: deletereport description: Delete a report call: bitbucket-pipelines-commits.deletereport with: workspace: rest.workspace repo_slug: rest.repo_slug commit: rest.commit reportId: rest.reportId outputParameters: - type: object mapping: $. - path: /v1/repositories/{workspace}/{repo-slug}/commit/{commit}/reports/{reportid}/annotations name: repositories-workspace-repo-slug-commit-commit-reports-reportid-annotations description: REST surface for repositories-workspace-repo_slug-commit-commit-reports-reportId-annotations. operations: - method: GET name: getannotationsforreport description: List annotations call: bitbucket-pipelines-commits.getannotationsforreport with: workspace: rest.workspace repo_slug: rest.repo_slug commit: rest.commit reportId: rest.reportId outputParameters: - type: object mapping: $. - method: POST name: bulkcreateorupdateannotations description: Bulk create or update annotations call: bitbucket-pipelines-commits.bulkcreateorupdateannotations with: workspace: rest.workspace repo_slug: rest.repo_slug commit: rest.commit reportId: rest.reportId _body: rest._body outputParameters: - type: object mapping: $. - path: /v1/repositories/{workspace}/{repo-slug}/commit/{commit}/reports/{reportid}/annotations/{annotationid} name: repositories-workspace-repo-slug-commit-commit-reports-reportid-annotations-anno description: REST surface for repositories-workspace-repo_slug-commit-commit-reports-reportId-annotations-anno. operations: - method: GET name: getannotation description: Get an annotation call: bitbucket-pipelines-commits.getannotation with: workspace: rest.workspace repo_slug: rest.repo_slug commit: rest.commit reportId: rest.reportId annotationId: rest.annotationId outputParameters: - type: object mapping: $. - method: PUT name: createorupdateannotation description: Create or update an annotation call: bitbucket-pipelines-commits.createorupdateannotation with: workspace: rest.workspace repo_slug: rest.repo_slug commit: rest.commit reportId: rest.reportId annotationId: rest.annotationId _body: rest._body outputParameters: - type: object mapping: $. - method: DELETE name: deleteannotation description: Delete an annotation call: bitbucket-pipelines-commits.deleteannotation with: workspace: rest.workspace repo_slug: rest.repo_slug commit: rest.commit reportId: rest.reportId annotationId: rest.annotationId outputParameters: - type: object mapping: $. - path: /v1/repositories/{workspace}/{repo-slug}/commits name: repositories-workspace-repo-slug-commits description: REST surface for repositories-workspace-repo_slug-commits. operations: - method: GET name: get description: List commits call: bitbucket-pipelines-commits.get outputParameters: - type: object mapping: $. - method: POST name: post description: List commits with include/exclude call: bitbucket-pipelines-commits.post outputParameters: - type: object mapping: $. - path: /v1/repositories/{workspace}/{repo-slug}/commits/{revision} name: repositories-workspace-repo-slug-commits-revision description: REST surface for repositories-workspace-repo_slug-commits-revision. operations: - method: GET name: get description: List commits for revision call: bitbucket-pipelines-commits.get outputParameters: - type: object mapping: $. - method: POST name: post description: List commits for revision using include/exclude call: bitbucket-pipelines-commits.post outputParameters: - type: object mapping: $. - path: /v1/repositories/{workspace}/{repo-slug}/diff/{spec} name: repositories-workspace-repo-slug-diff-spec description: REST surface for repositories-workspace-repo_slug-diff-spec. operations: - method: GET name: get description: Compare two commits call: bitbucket-pipelines-commits.get with: context: rest.context path: rest.path ignore_whitespace: rest.ignore_whitespace binary: rest.binary renames: rest.renames merge: rest.merge topic: rest.topic outputParameters: - type: object mapping: $. - path: /v1/repositories/{workspace}/{repo-slug}/diffstat/{spec} name: repositories-workspace-repo-slug-diffstat-spec description: REST surface for repositories-workspace-repo_slug-diffstat-spec. operations: - method: GET name: get description: Compare two commit diff stats call: bitbucket-pipelines-commits.get outputParameters: - type: object mapping: $. - path: /v1/repositories/{workspace}/{repo-slug}/merge-base/{revspec} name: repositories-workspace-repo-slug-merge-base-revspec description: REST surface for repositories-workspace-repo_slug-merge-base-revspec. operations: - method: GET name: get description: Get the common ancestor between two commits call: bitbucket-pipelines-commits.get outputParameters: - type: object mapping: $. - path: /v1/repositories/{workspace}/{repo-slug}/patch/{spec} name: repositories-workspace-repo-slug-patch-spec description: REST surface for repositories-workspace-repo_slug-patch-spec. operations: - method: GET name: get description: Get a patch for two commits call: bitbucket-pipelines-commits.get outputParameters: - type: object mapping: $. - type: mcp namespace: bitbucket-pipelines-commits-mcp port: 9090 transport: http description: MCP adapter for Bitbucket API — Commits. One tool per consumed operation, routed inline through this capability's consumes block. tools: - name: get-commit description: Get a commit hints: readOnly: true destructive: false idempotent: true call: bitbucket-pipelines-commits.get outputParameters: - type: object mapping: $. - name: unapprove-commit description: Unapprove a commit hints: readOnly: false destructive: true idempotent: true call: bitbucket-pipelines-commits.delete outputParameters: - type: object mapping: $. - name: approve-commit description: Approve a commit hints: readOnly: false destructive: false idempotent: false call: bitbucket-pipelines-commits.post outputParameters: - type: object mapping: $. - name: list-commit-s-comments description: List a commit's comments hints: readOnly: true destructive: false idempotent: true call: bitbucket-pipelines-commits.get with: q: tools.q sort: tools.sort outputParameters: - type: object mapping: $. - name: create-comment-commit description: Create comment for a commit hints: readOnly: false destructive: false idempotent: false call: bitbucket-pipelines-commits.post with: _body: tools._body outputParameters: - type: object mapping: $. - name: delete-commit-comment description: Delete a commit comment hints: readOnly: false destructive: true idempotent: true call: bitbucket-pipelines-commits.delete outputParameters: - type: object mapping: $. - name: get-commit-comment description: Get a commit comment hints: readOnly: true destructive: false idempotent: true call: bitbucket-pipelines-commits.get outputParameters: - type: object mapping: $. - name: update-commit-comment description: Update a commit comment hints: readOnly: false destructive: false idempotent: true call: bitbucket-pipelines-commits.put with: _body: tools._body outputParameters: - type: object mapping: $. - name: list-reports description: List reports hints: readOnly: true destructive: false idempotent: true call: bitbucket-pipelines-commits.getreportsforcommit with: workspace: tools.workspace repo_slug: tools.repo_slug commit: tools.commit outputParameters: - type: object mapping: $. - name: create-update-report description: Create or update a report hints: readOnly: false destructive: false idempotent: true call: bitbucket-pipelines-commits.createorupdatereport with: workspace: tools.workspace repo_slug: tools.repo_slug commit: tools.commit reportId: tools.reportId _body: tools._body outputParameters: - type: object mapping: $. - name: get-report description: Get a report hints: readOnly: true destructive: false idempotent: true call: bitbucket-pipelines-commits.getreport with: workspace: tools.workspace repo_slug: tools.repo_slug commit: tools.commit reportId: tools.reportId outputParameters: - type: object mapping: $. - name: delete-report description: Delete a report hints: readOnly: false destructive: true idempotent: true call: bitbucket-pipelines-commits.deletereport with: workspace: tools.workspace repo_slug: tools.repo_slug commit: tools.commit reportId: tools.reportId outputParameters: - type: object mapping: $. - name: list-annotations description: List annotations hints: readOnly: true destructive: false idempotent: true call: bitbucket-pipelines-commits.getannotationsforreport with: workspace: tools.workspace repo_slug: tools.repo_slug commit: tools.commit reportId: tools.reportId outputParameters: - type: object mapping: $. - name: bulk-create-update-annotations description: Bulk create or update annotations hints: readOnly: false destructive: false idempotent: false call: bitbucket-pipelines-commits.bulkcreateorupdateannotations with: workspace: tools.workspace repo_slug: tools.repo_slug commit: tools.commit reportId: tools.reportId _body: tools._body outputParameters: - type: object mapping: $. - name: get-annotation description: Get an annotation hints: readOnly: true destructive: false idempotent: true call: bitbucket-pipelines-commits.getannotation with: workspace: tools.workspace repo_slug: tools.repo_slug commit: tools.commit reportId: tools.reportId annotationId: tools.annotationId outputParameters: - type: object mapping: $. - name: create-update-annotation description: Create or update an annotation hints: readOnly: false destructive: false idempotent: true call: bitbucket-pipelines-commits.createorupdateannotation with: workspace: tools.workspace repo_slug: tools.repo_slug commit: tools.commit reportId: tools.reportId annotationId: tools.annotationId _body: tools._body outputParameters: - type: object mapping: $. - name: delete-annotation description: Delete an annotation hints: readOnly: false destructive: true idempotent: true call: bitbucket-pipelines-commits.deleteannotation with: workspace: tools.workspace repo_slug: tools.repo_slug commit: tools.commit reportId: tools.reportId annotationId: tools.annotationId outputParameters: - type: object mapping: $. - name: list-commits description: List commits hints: readOnly: true destructive: false idempotent: true call: bitbucket-pipelines-commits.get outputParameters: - type: object mapping: $. - name: list-commits-include-exclude description: List commits with include/exclude hints: readOnly: true destructive: false idempotent: false call: bitbucket-pipelines-commits.post outputParameters: - type: object mapping: $. - name: list-commits-revision description: List commits for revision hints: readOnly: true destructive: false idempotent: true call: bitbucket-pipelines-commits.get outputParameters: - type: object mapping: $. - name: list-commits-revision-using-include description: List commits for revision using include/exclude hints: readOnly: true destructive: false idempotent: false call: bitbucket-pipelines-commits.post outputParameters: - type: object mapping: $. - name: compare-two-commits description: Compare two commits hints: readOnly: true destructive: false idempotent: true call: bitbucket-pipelines-commits.get with: context: tools.context path: tools.path ignore_whitespace: tools.ignore_whitespace binary: tools.binary renames: tools.renames merge: tools.merge topic: tools.topic outputParameters: - type: object mapping: $. - name: compare-two-commit-diff-stats description: Compare two commit diff stats hints: readOnly: true destructive: false idempotent: true call: bitbucket-pipelines-commits.get outputParameters: - type: object mapping: $. - name: get-common-ancestor-between-two description: Get the common ancestor between two commits hints: readOnly: true destructive: false idempotent: true call: bitbucket-pipelines-commits.get outputParameters: - type: object mapping: $. - name: get-patch-two-commits description: Get a patch for two commits hints: readOnly: true destructive: false idempotent: true call: bitbucket-pipelines-commits.get outputParameters: - type: object mapping: $.