naftiko: 1.0.0-alpha2 info: label: Bitbucket API — Workspaces description: 'Bitbucket API — Workspaces. 19 operations. Lead operation: List workspaces for the current user. Self-contained Naftiko capability covering one Bitbucket Pipelines business surface.' tags: - Bitbucket Pipelines - Workspaces 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-workspaces baseUri: https://api.bitbucket.org/2.0 description: Bitbucket API — Workspaces business capability. Self-contained, no shared references. resources: - name: user-permissions-workspaces path: /user/permissions/workspaces operations: - name: get method: GET description: List workspaces for the current user outputRawFormat: json outputParameters: - name: result type: object value: $. inputParameters: - name: q in: query type: string description: Query string to narrow down the response. See - name: sort in: query type: string description: Name of a response property to sort results. See - name: user-workspaces path: /user/workspaces operations: - name: get method: GET description: List workspaces for the current user outputRawFormat: json outputParameters: - name: result type: object value: $. inputParameters: - name: sort in: query type: string description: Name of a response property to sort results (only slug is supported). - name: administrator in: query type: boolean description: Filter workspaces based on which ones the caller has admin permissions or not. - name: user-workspaces-workspace-permission path: /user/workspaces/{workspace}/permission operations: - name: get method: GET description: Get user permission on a workspace outputRawFormat: json outputParameters: - name: result type: object value: $. - name: workspaces path: /workspaces operations: - name: get method: GET description: List workspaces for user outputRawFormat: json outputParameters: - name: result type: object value: $. inputParameters: - name: role in: query type: string description: Filters the workspaces based on the authenticated user's role on each workspace. - name: q in: query type: string description: Query string to narrow down the response. See - name: sort in: query type: string description: Name of a response property to sort results. See - name: workspaces-workspace path: /workspaces/{workspace} operations: - name: get method: GET description: Get a workspace 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: $. - name: workspaces-workspace-members path: /workspaces/{workspace}/members operations: - name: get method: GET description: List users in a workspace outputRawFormat: json outputParameters: - name: result type: object value: $. - name: workspaces-workspace-members-member path: /workspaces/{workspace}/members/{member} operations: - name: get method: GET description: Get user membership for a workspace outputRawFormat: json outputParameters: - name: result type: object value: $. - name: workspaces-workspace-permissions path: /workspaces/{workspace}/permissions operations: - name: get method: GET description: List user permissions in a workspace 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: workspaces-workspace-permissions-repositories path: /workspaces/{workspace}/permissions/repositories operations: - name: get method: GET description: List all repository permissions for a workspace 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: Name of a response property sort the result by as per - name: workspaces-workspace-permissions-repositories-repo_slug path: /workspaces/{workspace}/permissions/repositories/{repo_slug} operations: - name: get method: GET description: List a repository permissions for a workspace 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: Name of a response property sort the result by as per - name: workspaces-workspace-projects path: /workspaces/{workspace}/projects operations: - name: get method: GET description: List projects in a workspace outputRawFormat: json outputParameters: - name: result type: object value: $. - name: workspaces-workspace-projects-project_key path: /workspaces/{workspace}/projects/{project_key} operations: - name: get method: GET description: Get a project for a workspace outputRawFormat: json outputParameters: - name: result type: object value: $. - name: workspaces-workspace-pullrequests-selected_user path: /workspaces/{workspace}/pullrequests/{selected_user} operations: - name: get method: GET description: List workspace pull requests for a user outputRawFormat: json outputParameters: - name: result type: object value: $. inputParameters: - name: state in: query type: string description: Only return pull requests that are in this state. This parameter can be repeated. - name: workspaces-workspace-settings-gpg-public-key path: /workspaces/{workspace}/settings/gpg/public-key operations: - name: get method: GET description: Get the workspace system GPG public key(s) outputRawFormat: json outputParameters: - name: result type: object value: $. exposes: - type: rest namespace: bitbucket-pipelines-workspaces-rest port: 8080 description: REST adapter for Bitbucket API — Workspaces. One Spectral-compliant resource per consumed operation, prefixed with /v1. resources: - path: /v1/user/permissions/workspaces name: user-permissions-workspaces description: REST surface for user-permissions-workspaces. operations: - method: GET name: get description: List workspaces for the current user call: bitbucket-pipelines-workspaces.get with: q: rest.q sort: rest.sort outputParameters: - type: object mapping: $. - path: /v1/user/workspaces name: user-workspaces description: REST surface for user-workspaces. operations: - method: GET name: get description: List workspaces for the current user call: bitbucket-pipelines-workspaces.get with: sort: rest.sort administrator: rest.administrator outputParameters: - type: object mapping: $. - path: /v1/user/workspaces/{workspace}/permission name: user-workspaces-workspace-permission description: REST surface for user-workspaces-workspace-permission. operations: - method: GET name: get description: Get user permission on a workspace call: bitbucket-pipelines-workspaces.get outputParameters: - type: object mapping: $. - path: /v1/workspaces name: workspaces description: REST surface for workspaces. operations: - method: GET name: get description: List workspaces for user call: bitbucket-pipelines-workspaces.get with: role: rest.role q: rest.q sort: rest.sort outputParameters: - type: object mapping: $. - path: /v1/workspaces/{workspace} name: workspaces-workspace description: REST surface for workspaces-workspace. operations: - method: GET name: get description: Get a workspace call: bitbucket-pipelines-workspaces.get 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-workspaces.get outputParameters: - type: object mapping: $. - method: POST name: post description: Create a webhook for a workspace call: bitbucket-pipelines-workspaces.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-workspaces.delete outputParameters: - type: object mapping: $. - method: GET name: get description: Get a webhook for a workspace call: bitbucket-pipelines-workspaces.get outputParameters: - type: object mapping: $. - method: PUT name: put description: Update a webhook for a workspace call: bitbucket-pipelines-workspaces.put outputParameters: - type: object mapping: $. - path: /v1/workspaces/{workspace}/members name: workspaces-workspace-members description: REST surface for workspaces-workspace-members. operations: - method: GET name: get description: List users in a workspace call: bitbucket-pipelines-workspaces.get outputParameters: - type: object mapping: $. - path: /v1/workspaces/{workspace}/members/{member} name: workspaces-workspace-members-member description: REST surface for workspaces-workspace-members-member. operations: - method: GET name: get description: Get user membership for a workspace call: bitbucket-pipelines-workspaces.get outputParameters: - type: object mapping: $. - path: /v1/workspaces/{workspace}/permissions name: workspaces-workspace-permissions description: REST surface for workspaces-workspace-permissions. operations: - method: GET name: get description: List user permissions in a workspace call: bitbucket-pipelines-workspaces.get with: q: rest.q outputParameters: - type: object mapping: $. - path: /v1/workspaces/{workspace}/permissions/repositories name: workspaces-workspace-permissions-repositories description: REST surface for workspaces-workspace-permissions-repositories. operations: - method: GET name: get description: List all repository permissions for a workspace call: bitbucket-pipelines-workspaces.get with: q: rest.q sort: rest.sort outputParameters: - type: object mapping: $. - path: /v1/workspaces/{workspace}/permissions/repositories/{repo-slug} name: workspaces-workspace-permissions-repositories-repo-slug description: REST surface for workspaces-workspace-permissions-repositories-repo_slug. operations: - method: GET name: get description: List a repository permissions for a workspace call: bitbucket-pipelines-workspaces.get with: q: rest.q sort: rest.sort outputParameters: - type: object mapping: $. - path: /v1/workspaces/{workspace}/projects name: workspaces-workspace-projects description: REST surface for workspaces-workspace-projects. operations: - method: GET name: get description: List projects in a workspace call: bitbucket-pipelines-workspaces.get outputParameters: - type: object mapping: $. - path: /v1/workspaces/{workspace}/projects/{project-key} name: workspaces-workspace-projects-project-key description: REST surface for workspaces-workspace-projects-project_key. operations: - method: GET name: get description: Get a project for a workspace call: bitbucket-pipelines-workspaces.get outputParameters: - type: object mapping: $. - path: /v1/workspaces/{workspace}/pullrequests/{selected-user} name: workspaces-workspace-pullrequests-selected-user description: REST surface for workspaces-workspace-pullrequests-selected_user. operations: - method: GET name: get description: List workspace pull requests for a user call: bitbucket-pipelines-workspaces.get with: state: rest.state outputParameters: - type: object mapping: $. - path: /v1/workspaces/{workspace}/settings/gpg/public-key name: workspaces-workspace-settings-gpg-public-key description: REST surface for workspaces-workspace-settings-gpg-public-key. operations: - method: GET name: get description: Get the workspace system GPG public key(s) call: bitbucket-pipelines-workspaces.get outputParameters: - type: object mapping: $. - type: mcp namespace: bitbucket-pipelines-workspaces-mcp port: 9090 transport: http description: MCP adapter for Bitbucket API — Workspaces. One tool per consumed operation, routed inline through this capability's consumes block. tools: - name: list-workspaces-current-user description: List workspaces for the current user hints: readOnly: true destructive: false idempotent: true call: bitbucket-pipelines-workspaces.get with: q: tools.q sort: tools.sort outputParameters: - type: object mapping: $. - name: list-workspaces-current-user-2 description: List workspaces for the current user hints: readOnly: true destructive: false idempotent: true call: bitbucket-pipelines-workspaces.get with: sort: tools.sort administrator: tools.administrator outputParameters: - type: object mapping: $. - name: get-user-permission-workspace description: Get user permission on a workspace hints: readOnly: true destructive: false idempotent: true call: bitbucket-pipelines-workspaces.get outputParameters: - type: object mapping: $. - name: list-workspaces-user description: List workspaces for user hints: readOnly: true destructive: false idempotent: true call: bitbucket-pipelines-workspaces.get with: role: tools.role q: tools.q sort: tools.sort outputParameters: - type: object mapping: $. - name: get-workspace description: Get a workspace hints: readOnly: true destructive: false idempotent: true call: bitbucket-pipelines-workspaces.get outputParameters: - type: object mapping: $. - name: list-webhooks-workspace description: List webhooks for a workspace hints: readOnly: true destructive: false idempotent: true call: bitbucket-pipelines-workspaces.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-workspaces.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-workspaces.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-workspaces.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-workspaces.put outputParameters: - type: object mapping: $. - name: list-users-workspace description: List users in a workspace hints: readOnly: true destructive: false idempotent: true call: bitbucket-pipelines-workspaces.get outputParameters: - type: object mapping: $. - name: get-user-membership-workspace description: Get user membership for a workspace hints: readOnly: true destructive: false idempotent: true call: bitbucket-pipelines-workspaces.get outputParameters: - type: object mapping: $. - name: list-user-permissions-workspace description: List user permissions in a workspace hints: readOnly: true destructive: false idempotent: true call: bitbucket-pipelines-workspaces.get with: q: tools.q outputParameters: - type: object mapping: $. - name: list-all-repository-permissions-workspace description: List all repository permissions for a workspace hints: readOnly: true destructive: false idempotent: true call: bitbucket-pipelines-workspaces.get with: q: tools.q sort: tools.sort outputParameters: - type: object mapping: $. - name: list-repository-permissions-workspace description: List a repository permissions for a workspace hints: readOnly: true destructive: false idempotent: true call: bitbucket-pipelines-workspaces.get with: q: tools.q sort: tools.sort outputParameters: - type: object mapping: $. - name: list-projects-workspace description: List projects in a workspace hints: readOnly: true destructive: false idempotent: true call: bitbucket-pipelines-workspaces.get outputParameters: - type: object mapping: $. - name: get-project-workspace description: Get a project for a workspace hints: readOnly: true destructive: false idempotent: true call: bitbucket-pipelines-workspaces.get outputParameters: - type: object mapping: $. - name: list-workspace-pull-requests-user description: List workspace pull requests for a user hints: readOnly: true destructive: false idempotent: true call: bitbucket-pipelines-workspaces.get with: state: tools.state outputParameters: - type: object mapping: $. - name: get-workspace-system-gpg-public description: Get the workspace system GPG public key(s) hints: readOnly: true destructive: false idempotent: true call: bitbucket-pipelines-workspaces.get outputParameters: - type: object mapping: $.