Bitbucket · Capability

Bitbucket API — Workspaces

Bitbucket API — Workspaces. 18 operations. Lead operation: List workspaces for the current user. Self-contained Naftiko capability covering one Bitbucket business surface.

Run with Naftiko BitbucketWorkspaces

What You Can Do

GET
Get — List workspaces for the current user
/v1/user/permissions/workspaces
GET
Get — List workspaces for the current user
/v1/user/workspaces
GET
Get — Get user permission on a workspace
/v1/user/workspaces/{workspace}/permission
GET
Get — List workspaces for user
/v1/workspaces
GET
Get — Get a workspace
/v1/workspaces/{workspace}
GET
Get — List webhooks for a workspace
/v1/workspaces/{workspace}/hooks
POST
Post — Create a webhook for a workspace
/v1/workspaces/{workspace}/hooks
DELETE
Delete — Delete a webhook for a workspace
/v1/workspaces/{workspace}/hooks/{uid}
GET
Get — Get a webhook for a workspace
/v1/workspaces/{workspace}/hooks/{uid}
PUT
Put — Update a webhook for a workspace
/v1/workspaces/{workspace}/hooks/{uid}
GET
Get — List users in a workspace
/v1/workspaces/{workspace}/members
GET
Get — Get user membership for a workspace
/v1/workspaces/{workspace}/members/{member}
GET
Get — List user permissions in a workspace
/v1/workspaces/{workspace}/permissions
GET
Get — List all repository permissions for a workspace
/v1/workspaces/{workspace}/permissions/repositories
GET
Get — List a repository permissions for a workspace
/v1/workspaces/{workspace}/permissions/repositories/{repo-slug}
GET
Get — List projects in a workspace
/v1/workspaces/{workspace}/projects
GET
Get — Get a project for a workspace
/v1/workspaces/{workspace}/projects/{project-key}
GET
Get — List workspace pull requests for a user
/v1/workspaces/{workspace}/pullrequests/{selected-user}

MCP Tools

list-workspaces-current-user

List workspaces for the current user

read-only idempotent
list-workspaces-current-user-2

List workspaces for the current user

read-only idempotent
get-user-permission-workspace

Get user permission on a workspace

read-only idempotent
list-workspaces-user

List workspaces for user

read-only idempotent
get-workspace

Get a workspace

read-only idempotent
list-webhooks-workspace

List webhooks for a workspace

read-only idempotent
create-webhook-workspace

Create a webhook for a workspace

delete-webhook-workspace

Delete a webhook for a workspace

idempotent
get-webhook-workspace

Get a webhook for a workspace

read-only idempotent
update-webhook-workspace

Update a webhook for a workspace

idempotent
list-users-workspace

List users in a workspace

read-only idempotent
get-user-membership-workspace

Get user membership for a workspace

read-only idempotent
list-user-permissions-workspace

List user permissions in a workspace

read-only idempotent
list-all-repository-permissions-workspace

List all repository permissions for a workspace

read-only idempotent
list-repository-permissions-workspace

List a repository permissions for a workspace

read-only idempotent
list-projects-workspace

List projects in a workspace

read-only idempotent
get-project-workspace

Get a project for a workspace

read-only idempotent
list-workspace-pull-requests-user

List workspace pull requests for a user

read-only idempotent

Capability Spec

cloud-rest-workspaces.yaml Raw ↑
naftiko: 1.0.0-alpha2
info:
  label: Bitbucket API — Workspaces
  description: 'Bitbucket API — Workspaces. 18 operations. Lead operation: List workspaces for the current user. Self-contained
    Naftiko capability covering one Bitbucket business surface.'
  tags:
  - Bitbucket
  - Workspaces
  created: '2026-05-19'
  modified: '2026-05-19'
binds:
- namespace: env
  keys:
    BITBUCKET_API_KEY: BITBUCKET_API_KEY
capability:
  consumes:
  - type: http
    namespace: cloud-rest-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.
  exposes:
  - type: rest
    namespace: cloud-rest-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: cloud-rest-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: cloud-rest-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: cloud-rest-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: cloud-rest-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: cloud-rest-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: cloud-rest-workspaces.get
        outputParameters:
        - type: object
          mapping: $.
      - method: POST
        name: post
        description: Create a webhook for a workspace
        call: cloud-rest-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: cloud-rest-workspaces.delete
        outputParameters:
        - type: object
          mapping: $.
      - method: GET
        name: get
        description: Get a webhook for a workspace
        call: cloud-rest-workspaces.get
        outputParameters:
        - type: object
          mapping: $.
      - method: PUT
        name: put
        description: Update a webhook for a workspace
        call: cloud-rest-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: cloud-rest-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: cloud-rest-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: cloud-rest-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: cloud-rest-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: cloud-rest-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: cloud-rest-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: cloud-rest-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: cloud-rest-workspaces.get
        with:
          state: rest.state
        outputParameters:
        - type: object
          mapping: $.
  - type: mcp
    namespace: cloud-rest-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: cloud-rest-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: cloud-rest-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: cloud-rest-workspaces.get
      outputParameters:
      - type: object
        mapping: $.
    - name: list-workspaces-user
      description: List workspaces for user
      hints:
        readOnly: true
        destructive: false
        idempotent: true
      call: cloud-rest-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: cloud-rest-workspaces.get
      outputParameters:
      - type: object
        mapping: $.
    - name: list-webhooks-workspace
      description: List webhooks for a workspace
      hints:
        readOnly: true
        destructive: false
        idempotent: true
      call: cloud-rest-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: cloud-rest-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: cloud-rest-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: cloud-rest-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: cloud-rest-workspaces.put
      outputParameters:
      - type: object
        mapping: $.
    - name: list-users-workspace
      description: List users in a workspace
      hints:
        readOnly: true
        destructive: false
        idempotent: true
      call: cloud-rest-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: cloud-rest-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: cloud-rest-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: cloud-rest-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: cloud-rest-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: cloud-rest-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: cloud-rest-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: cloud-rest-workspaces.get
      with:
        state: tools.state
      outputParameters:
      - type: object
        mapping: $.