naftiko: 1.0.0-alpha2 info: label: Bitbucket API — Webhooks description: 'Bitbucket API — Webhooks. 12 operations. Lead operation: Get a webhook resource. Self-contained Naftiko capability covering one Bitbucket Pipelines business surface.' tags: - Bitbucket Pipelines - Webhooks 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-webhooks baseUri: https://api.bitbucket.org/2.0 description: Bitbucket API — Webhooks business capability. Self-contained, no shared references. resources: - name: hook_events path: /hook_events operations: - name: get method: GET description: Get a webhook resource outputRawFormat: json outputParameters: - name: result type: object value: $. - name: hook_events-subject_type path: /hook_events/{subject_type} operations: - name: get method: GET description: List subscribable webhook types outputRawFormat: json outputParameters: - name: result type: object value: $. - name: repositories-workspace-repo_slug-hooks path: /repositories/{workspace}/{repo_slug}/hooks operations: - name: get method: GET description: List webhooks for a repository outputRawFormat: json outputParameters: - name: result type: object value: $. - name: post method: POST description: Create a webhook for a repository outputRawFormat: json outputParameters: - name: result type: object value: $. - name: repositories-workspace-repo_slug-hooks-uid path: /repositories/{workspace}/{repo_slug}/hooks/{uid} operations: - name: delete method: DELETE description: Delete a webhook for a repository outputRawFormat: json outputParameters: - name: result type: object value: $. - name: get method: GET description: Get a webhook for a repository outputRawFormat: json outputParameters: - name: result type: object value: $. - name: put method: PUT description: Update a webhook for a repository outputRawFormat: json outputParameters: - name: result type: object value: $. - name: workspaces-workspace-hooks path: /workspaces/{workspace}/hooks operations: - name: get method: GET description: List webhooks for a workspace outputRawFormat: json outputParameters: - name: result type: object value: $. - name: post method: POST description: Create a webhook for a workspace outputRawFormat: json outputParameters: - name: result type: object value: $. - name: workspaces-workspace-hooks-uid path: /workspaces/{workspace}/hooks/{uid} operations: - name: delete method: DELETE description: Delete a webhook for a workspace outputRawFormat: json outputParameters: - name: result type: object value: $. - name: get method: GET description: Get a webhook for a workspace outputRawFormat: json outputParameters: - name: result type: object value: $. - name: put method: PUT description: Update a webhook for a workspace outputRawFormat: json outputParameters: - name: result type: object value: $. exposes: - type: rest namespace: bitbucket-pipelines-webhooks-rest port: 8080 description: REST adapter for Bitbucket API — Webhooks. One Spectral-compliant resource per consumed operation, prefixed with /v1. resources: - path: /v1/hook-events name: hook-events description: REST surface for hook_events. operations: - method: GET name: get description: Get a webhook resource call: bitbucket-pipelines-webhooks.get outputParameters: - type: object mapping: $. - path: /v1/hook-events/{subject-type} name: hook-events-subject-type description: REST surface for hook_events-subject_type. operations: - method: GET name: get description: List subscribable webhook types call: bitbucket-pipelines-webhooks.get outputParameters: - type: object mapping: $. - path: /v1/repositories/{workspace}/{repo-slug}/hooks name: repositories-workspace-repo-slug-hooks description: REST surface for repositories-workspace-repo_slug-hooks. operations: - method: GET name: get description: List webhooks for a repository call: bitbucket-pipelines-webhooks.get outputParameters: - type: object mapping: $. - method: POST name: post description: Create a webhook for a repository call: bitbucket-pipelines-webhooks.post outputParameters: - type: object mapping: $. - path: /v1/repositories/{workspace}/{repo-slug}/hooks/{uid} name: repositories-workspace-repo-slug-hooks-uid description: REST surface for repositories-workspace-repo_slug-hooks-uid. operations: - method: DELETE name: delete description: Delete a webhook for a repository call: bitbucket-pipelines-webhooks.delete outputParameters: - type: object mapping: $. - method: GET name: get description: Get a webhook for a repository call: bitbucket-pipelines-webhooks.get outputParameters: - type: object mapping: $. - method: PUT name: put description: Update a webhook for a repository call: bitbucket-pipelines-webhooks.put outputParameters: - type: object mapping: $. - path: /v1/workspaces/{workspace}/hooks name: workspaces-workspace-hooks description: REST surface for workspaces-workspace-hooks. operations: - method: GET name: get description: List webhooks for a workspace call: bitbucket-pipelines-webhooks.get outputParameters: - type: object mapping: $. - method: POST name: post description: Create a webhook for a workspace call: bitbucket-pipelines-webhooks.post outputParameters: - type: object mapping: $. - path: /v1/workspaces/{workspace}/hooks/{uid} name: workspaces-workspace-hooks-uid description: REST surface for workspaces-workspace-hooks-uid. operations: - method: DELETE name: delete description: Delete a webhook for a workspace call: bitbucket-pipelines-webhooks.delete outputParameters: - type: object mapping: $. - method: GET name: get description: Get a webhook for a workspace call: bitbucket-pipelines-webhooks.get outputParameters: - type: object mapping: $. - method: PUT name: put description: Update a webhook for a workspace call: bitbucket-pipelines-webhooks.put outputParameters: - type: object mapping: $. - type: mcp namespace: bitbucket-pipelines-webhooks-mcp port: 9090 transport: http description: MCP adapter for Bitbucket API — Webhooks. One tool per consumed operation, routed inline through this capability's consumes block. tools: - name: get-webhook-resource description: Get a webhook resource hints: readOnly: true destructive: false idempotent: true call: bitbucket-pipelines-webhooks.get outputParameters: - type: object mapping: $. - name: list-subscribable-webhook-types description: List subscribable webhook types hints: readOnly: true destructive: false idempotent: true call: bitbucket-pipelines-webhooks.get outputParameters: - type: object mapping: $. - name: list-webhooks-repository description: List webhooks for a repository hints: readOnly: true destructive: false idempotent: true call: bitbucket-pipelines-webhooks.get outputParameters: - type: object mapping: $. - name: create-webhook-repository description: Create a webhook for a repository hints: readOnly: false destructive: false idempotent: false call: bitbucket-pipelines-webhooks.post outputParameters: - type: object mapping: $. - name: delete-webhook-repository description: Delete a webhook for a repository hints: readOnly: false destructive: true idempotent: true call: bitbucket-pipelines-webhooks.delete outputParameters: - type: object mapping: $. - name: get-webhook-repository description: Get a webhook for a repository hints: readOnly: true destructive: false idempotent: true call: bitbucket-pipelines-webhooks.get outputParameters: - type: object mapping: $. - name: update-webhook-repository description: Update a webhook for a repository hints: readOnly: false destructive: false idempotent: true call: bitbucket-pipelines-webhooks.put outputParameters: - type: object mapping: $. - name: list-webhooks-workspace description: List webhooks for a workspace hints: readOnly: true destructive: false idempotent: true call: bitbucket-pipelines-webhooks.get outputParameters: - type: object mapping: $. - name: create-webhook-workspace description: Create a webhook for a workspace hints: readOnly: false destructive: false idempotent: false call: bitbucket-pipelines-webhooks.post outputParameters: - type: object mapping: $. - name: delete-webhook-workspace description: Delete a webhook for a workspace hints: readOnly: false destructive: true idempotent: true call: bitbucket-pipelines-webhooks.delete outputParameters: - type: object mapping: $. - name: get-webhook-workspace description: Get a webhook for a workspace hints: readOnly: true destructive: false idempotent: true call: bitbucket-pipelines-webhooks.get outputParameters: - type: object mapping: $. - name: update-webhook-workspace description: Update a webhook for a workspace hints: readOnly: false destructive: false idempotent: true call: bitbucket-pipelines-webhooks.put outputParameters: - type: object mapping: $.