Bitbucket Pipelines · Capability

Bitbucket API — Repositories

Bitbucket API — Repositories. 30 operations. Lead operation: List public repositories. Self-contained Naftiko capability covering one Bitbucket Pipelines business surface.

Run with Naftiko Bitbucket PipelinesRepositories

What You Can Do

GET
Get — List public repositories
/v1/repositories
GET
Get — List repositories in a workspace
/v1/repositories/{workspace}
DELETE
Delete — Delete a repository
/v1/repositories/{workspace}/{repo-slug}
GET
Get — Get a repository
/v1/repositories/{workspace}/{repo-slug}
POST
Post — Create a repository
/v1/repositories/{workspace}/{repo-slug}
PUT
Put — Update a repository
/v1/repositories/{workspace}/{repo-slug}
GET
Get — List commits that modified a file
/v1/repositories/{workspace}/{repo-slug}/filehistory/{commit}/{path}
GET
Get — List repository forks
/v1/repositories/{workspace}/{repo-slug}/forks
POST
Post — Fork a repository
/v1/repositories/{workspace}/{repo-slug}/forks
GET
Get — List webhooks for a repository
/v1/repositories/{workspace}/{repo-slug}/hooks
POST
Post — Create a webhook for a repository
/v1/repositories/{workspace}/{repo-slug}/hooks
DELETE
Delete — Delete a webhook for a repository
/v1/repositories/{workspace}/{repo-slug}/hooks/{uid}
GET
Get — Get a webhook for a repository
/v1/repositories/{workspace}/{repo-slug}/hooks/{uid}
PUT
Put — Update a webhook for a repository
/v1/repositories/{workspace}/{repo-slug}/hooks/{uid}
GET
Get — Retrieve the inheritance state for repository settings
/v1/repositories/{workspace}/{repo-slug}/override-settings
PUT
Put — Set the inheritance state for repository settings
/v1/repositories/{workspace}/{repo-slug}/override-settings
GET
Get — List explicit group permissions for a repository
/v1/repositories/{workspace}/{repo-slug}/permissions-config/groups
DELETE
Delete — Delete an explicit group permission for a repository
/v1/repositories/{workspace}/{repo-slug}/permissions-config/groups/{group-slug}
GET
Get — Get an explicit group permission for a repository
/v1/repositories/{workspace}/{repo-slug}/permissions-config/groups/{group-slug}
PUT
Put — Update an explicit group permission for a repository
/v1/repositories/{workspace}/{repo-slug}/permissions-config/groups/{group-slug}
GET
Get — List explicit user permissions for a repository
/v1/repositories/{workspace}/{repo-slug}/permissions-config/users
DELETE
Delete — Delete an explicit user permission for a repository
/v1/repositories/{workspace}/{repo-slug}/permissions-config/users/{selected-user-id}
GET
Get — Get an explicit user permission for a repository
/v1/repositories/{workspace}/{repo-slug}/permissions-config/users/{selected-user-id}
PUT
Put — Update an explicit user permission for a repository
/v1/repositories/{workspace}/{repo-slug}/permissions-config/users/{selected-user-id}
GET
Get — Get the root directory of the main branch
/v1/repositories/{workspace}/{repo-slug}/src
POST
Post — Create a commit by uploading a file
/v1/repositories/{workspace}/{repo-slug}/src
GET
Get — Get file or directory contents
/v1/repositories/{workspace}/{repo-slug}/src/{commit}/{path}
GET
Get — List repositories watchers
/v1/repositories/{workspace}/{repo-slug}/watchers
GET
Get — List repository permissions for a user
/v1/user/permissions/repositories
GET
Get — List repository permissions in a workspace for a user
/v1/user/workspaces/{workspace}/permissions/repositories

MCP Tools

list-public-repositories

List public repositories

read-only idempotent
list-repositories-workspace

List repositories in a workspace

read-only idempotent
delete-repository

Delete a repository

idempotent
get-repository

Get a repository

read-only idempotent
create-repository

Create a repository

update-repository

Update a repository

idempotent
list-commits-that-modified-file

List commits that modified a file

read-only idempotent
list-repository-forks

List repository forks

read-only idempotent
fork-repository

Fork a repository

list-webhooks-repository

List webhooks for a repository

read-only idempotent
create-webhook-repository

Create a webhook for a repository

delete-webhook-repository

Delete a webhook for a repository

idempotent
get-webhook-repository

Get a webhook for a repository

read-only idempotent
update-webhook-repository

Update a webhook for a repository

idempotent
retrieve-inheritance-state-repository-settings

Retrieve the inheritance state for repository settings

read-only idempotent
set-inheritance-state-repository-settings

Set the inheritance state for repository settings

idempotent
list-explicit-group-permissions-repository

List explicit group permissions for a repository

read-only idempotent
delete-explicit-group-permission-repository

Delete an explicit group permission for a repository

idempotent
get-explicit-group-permission-repository

Get an explicit group permission for a repository

read-only idempotent
update-explicit-group-permission-repository

Update an explicit group permission for a repository

idempotent
list-explicit-user-permissions-repository

List explicit user permissions for a repository

read-only idempotent
delete-explicit-user-permission-repository

Delete an explicit user permission for a repository

idempotent
get-explicit-user-permission-repository

Get an explicit user permission for a repository

read-only idempotent
update-explicit-user-permission-repository

Update an explicit user permission for a repository

idempotent
get-root-directory-main-branch

Get the root directory of the main branch

read-only idempotent
create-commit-uploading-file

Create a commit by uploading a file

get-file-directory-contents

Get file or directory contents

read-only idempotent
list-repositories-watchers

List repositories watchers

read-only idempotent
list-repository-permissions-user

List repository permissions for a user

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

List repository permissions in a workspace for a user

read-only idempotent

Capability Spec

bitbucket-pipelines-repositories.yaml Raw ↑
naftiko: 1.0.0-alpha2
info:
  label: Bitbucket API — Repositories
  description: 'Bitbucket API — Repositories. 30 operations. Lead operation: List public repositories. Self-contained Naftiko
    capability covering one Bitbucket Pipelines business surface.'
  tags:
  - Bitbucket Pipelines
  - Repositories
  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-repositories
    baseUri: https://api.bitbucket.org/2.0
    description: Bitbucket API — Repositories business capability. Self-contained, no shared references.
    resources:
    - name: repositories
      path: /repositories
      operations:
      - name: get
        method: GET
        description: List public repositories
        outputRawFormat: json
        outputParameters:
        - name: result
          type: object
          value: $.
        inputParameters:
        - name: after
          in: query
          type: string
          description: Filter the results to include only repositories created on or
        - name: role
          in: query
          type: string
          description: Filters the result based on the authenticated user's role on each repository.
        - name: q
          in: query
          type: string
          description: Query string to narrow down the response as per [filtering and sorting](/cloud/bitbucket/rest/intro/#filtering).
        - name: sort
          in: query
          type: string
          description: Field by which the results should be sorted as per [filtering and sorting](/cloud/bitbucket/rest/intro/#filtering).
    - name: repositories-workspace
      path: /repositories/{workspace}
      operations:
      - name: get
        method: GET
        description: List repositories in a workspace
        outputRawFormat: json
        outputParameters:
        - name: result
          type: object
          value: $.
        inputParameters:
        - name: role
          in: query
          type: string
          description: Filters the result based on the authenticated user's role on each repository.
        - name: q
          in: query
          type: string
          description: Query string to narrow down the response as per [filtering and sorting](/cloud/bitbucket/rest/intro/#filtering).
        - name: sort
          in: query
          type: string
          description: Field by which the results should be sorted as per [filtering and sorting](/cloud/bitbucket/rest/intro/#filtering).
    - name: repositories-workspace-repo_slug
      path: /repositories/{workspace}/{repo_slug}
      operations:
      - name: delete
        method: DELETE
        description: Delete a repository
        outputRawFormat: json
        outputParameters:
        - name: result
          type: object
          value: $.
        inputParameters:
        - name: redirect_to
          in: query
          type: string
          description: If a repository has been moved to a new location, use this parameter to
      - name: get
        method: GET
        description: Get a repository
        outputRawFormat: json
        outputParameters:
        - name: result
          type: object
          value: $.
      - name: post
        method: POST
        description: Create a repository
        outputRawFormat: json
        outputParameters:
        - name: result
          type: object
          value: $.
        inputParameters:
        - name: _body
          in: body
          type: string
          description: The repository that is to be created. Note that most object elements are optional. Elements "owner"
            and "full_name" are ignored as the URL implies them.
      - name: put
        method: PUT
        description: Update a repository
        outputRawFormat: json
        outputParameters:
        - name: result
          type: object
          value: $.
        inputParameters:
        - name: _body
          in: body
          type: string
          description: The repository that is to be updated.
    - name: repositories-workspace-repo_slug-filehistory-commit-path
      path: /repositories/{workspace}/{repo_slug}/filehistory/{commit}/{path}
      operations:
      - name: get
        method: GET
        description: List commits that modified a file
        outputRawFormat: json
        outputParameters:
        - name: result
          type: object
          value: $.
        inputParameters:
        - name: renames
          in: query
          type: string
          description: When `true`, Bitbucket will follow the history of the file across
        - 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: repositories-workspace-repo_slug-forks
      path: /repositories/{workspace}/{repo_slug}/forks
      operations:
      - name: get
        method: GET
        description: List repository forks
        outputRawFormat: json
        outputParameters:
        - name: result
          type: object
          value: $.
        inputParameters:
        - name: role
          in: query
          type: string
          description: Filters the result based on the authenticated user's role on each repository.
        - name: q
          in: query
          type: string
          description: Query string to narrow down the response as per [filtering and sorting](/cloud/bitbucket/rest/intro/#filtering).
        - name: sort
          in: query
          type: string
          description: Field by which the results should be sorted as per [filtering and sorting](/cloud/bitbucket/rest/intro/#filtering).
      - name: post
        method: POST
        description: Fork a repository
        outputRawFormat: json
        outputParameters:
        - name: result
          type: object
          value: $.
        inputParameters:
        - name: _body
          in: body
          type: string
          description: A repository object. This can be left blank.
    - 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: repositories-workspace-repo_slug-override-settings
      path: /repositories/{workspace}/{repo_slug}/override-settings
      operations:
      - name: get
        method: GET
        description: Retrieve the inheritance state for repository settings
        outputRawFormat: json
        outputParameters:
        - name: result
          type: object
          value: $.
      - name: put
        method: PUT
        description: Set the inheritance state for repository settings
        outputRawFormat: json
        outputParameters:
        - name: result
          type: object
          value: $.
    - name: repositories-workspace-repo_slug-permissions-config-groups
      path: /repositories/{workspace}/{repo_slug}/permissions-config/groups
      operations:
      - name: get
        method: GET
        description: List explicit group permissions for a repository
        outputRawFormat: json
        outputParameters:
        - name: result
          type: object
          value: $.
    - name: repositories-workspace-repo_slug-permissions-config-groups-group_slug
      path: /repositories/{workspace}/{repo_slug}/permissions-config/groups/{group_slug}
      operations:
      - name: delete
        method: DELETE
        description: Delete an explicit group permission for a repository
        outputRawFormat: json
        outputParameters:
        - name: result
          type: object
          value: $.
      - name: get
        method: GET
        description: Get an explicit group permission for a repository
        outputRawFormat: json
        outputParameters:
        - name: result
          type: object
          value: $.
      - name: put
        method: PUT
        description: Update an explicit group permission for a repository
        outputRawFormat: json
        outputParameters:
        - name: result
          type: object
          value: $.
        inputParameters:
        - name: _body
          in: body
          type: string
          description: The permission to grant
          required: true
    - name: repositories-workspace-repo_slug-permissions-config-users
      path: /repositories/{workspace}/{repo_slug}/permissions-config/users
      operations:
      - name: get
        method: GET
        description: List explicit user permissions for a repository
        outputRawFormat: json
        outputParameters:
        - name: result
          type: object
          value: $.
    - name: repositories-workspace-repo_slug-permissions-config-users-selected_user_id
      path: /repositories/{workspace}/{repo_slug}/permissions-config/users/{selected_user_id}
      operations:
      - name: delete
        method: DELETE
        description: Delete an explicit user permission for a repository
        outputRawFormat: json
        outputParameters:
        - name: result
          type: object
          value: $.
      - name: get
        method: GET
        description: Get an explicit user permission for a repository
        outputRawFormat: json
        outputParameters:
        - name: result
          type: object
          value: $.
      - name: put
        method: PUT
        description: Update an explicit user permission for a repository
        outputRawFormat: json
        outputParameters:
        - name: result
          type: object
          value: $.
        inputParameters:
        - name: _body
          in: body
          type: string
          description: The permission to grant
          required: true
    - name: repositories-workspace-repo_slug-src
      path: /repositories/{workspace}/{repo_slug}/src
      operations:
      - name: get
        method: GET
        description: Get the root directory of the main branch
        outputRawFormat: json
        outputParameters:
        - name: result
          type: object
          value: $.
        inputParameters:
        - name: format
          in: query
          type: string
          description: Instead of returning the file's contents, return the (json) meta data for it.
      - name: post
        method: POST
        description: Create a commit by uploading a file
        outputRawFormat: json
        outputParameters:
        - name: result
          type: object
          value: $.
        inputParameters:
        - name: message
          in: query
          type: string
          description: The commit message. When omitted, Bitbucket uses a canned string.
        - name: author
          in: query
          type: string
          description: The raw string to be used as the new commit's author.
        - name: parents
          in: query
          type: string
          description: '#### Deprecation Notice:'
        - name: files
          in: query
          type: string
          description: Optional field that declares the files that the request is
        - name: branch
          in: query
          type: string
          description: The name of the branch that the new commit should be
    - name: repositories-workspace-repo_slug-src-commit-path
      path: /repositories/{workspace}/{repo_slug}/src/{commit}/{path}
      operations:
      - name: get
        method: GET
        description: Get file or directory contents
        outputRawFormat: json
        outputParameters:
        - name: result
          type: object
          value: $.
        inputParameters:
        - name: format
          in: query
          type: string
          description: If 'meta' is provided, returns the (json) meta data for the contents of the file.  If 'rendered' is
            provided, returns the contents of a non-binary file in HTML-
        - name: q
          in: query
          type: string
          description: Optional filter expression as per [filtering and sorting](/cloud/bitbucket/rest/intro/#filtering).
        - name: sort
          in: query
          type: string
          description: Optional sorting parameter as per [filtering and sorting](/cloud/bitbucket/rest/intro/#sorting-query-results).
        - name: max_depth
          in: query
          type: integer
          description: If provided, returns the contents of the repository and its subdirectories recursively until the specified
            max_depth of nested directories. When omitted, this d
    - name: repositories-workspace-repo_slug-watchers
      path: /repositories/{workspace}/{repo_slug}/watchers
      operations:
      - name: get
        method: GET
        description: List repositories watchers
        outputRawFormat: json
        outputParameters:
        - name: result
          type: object
          value: $.
    - name: user-permissions-repositories
      path: /user/permissions/repositories
      operations:
      - name: get
        method: GET
        description: List repository permissions for a user
        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: user-workspaces-workspace-permissions-repositories
      path: /user/workspaces/{workspace}/permissions/repositories
      operations:
      - name: get
        method: GET
        description: List repository permissions in a workspace for a user
        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
  exposes:
  - type: rest
    namespace: bitbucket-pipelines-repositories-rest
    port: 8080
    description: REST adapter for Bitbucket API — Repositories. One Spectral-compliant resource per consumed operation, prefixed
      with /v1.
    resources:
    - path: /v1/repositories
      name: repositories
      description: REST surface for repositories.
      operations:
      - method: GET
        name: get
        description: List public repositories
        call: bitbucket-pipelines-repositories.get
        with:
          after: rest.after
          role: rest.role
          q: rest.q
          sort: rest.sort
        outputParameters:
        - type: object
          mapping: $.
    - path: /v1/repositories/{workspace}
      name: repositories-workspace
      description: REST surface for repositories-workspace.
      operations:
      - method: GET
        name: get
        description: List repositories in a workspace
        call: bitbucket-pipelines-repositories.get
        with:
          role: rest.role
          q: rest.q
          sort: rest.sort
        outputParameters:
        - type: object
          mapping: $.
    - path: /v1/repositories/{workspace}/{repo-slug}
      name: repositories-workspace-repo-slug
      description: REST surface for repositories-workspace-repo_slug.
      operations:
      - method: DELETE
        name: delete
        description: Delete a repository
        call: bitbucket-pipelines-repositories.delete
        with:
          redirect_to: rest.redirect_to
        outputParameters:
        - type: object
          mapping: $.
      - method: GET
        name: get
        description: Get a repository
        call: bitbucket-pipelines-repositories.get
        outputParameters:
        - type: object
          mapping: $.
      - method: POST
        name: post
        description: Create a repository
        call: bitbucket-pipelines-repositories.post
        with:
          _body: rest._body
        outputParameters:
        - type: object
          mapping: $.
      - method: PUT
        name: put
        description: Update a repository
        call: bitbucket-pipelines-repositories.put
        with:
          _body: rest._body
        outputParameters:
        - type: object
          mapping: $.
    - path: /v1/repositories/{workspace}/{repo-slug}/filehistory/{commit}/{path}
      name: repositories-workspace-repo-slug-filehistory-commit-path
      description: REST surface for repositories-workspace-repo_slug-filehistory-commit-path.
      operations:
      - method: GET
        name: get
        description: List commits that modified a file
        call: bitbucket-pipelines-repositories.get
        with:
          renames: rest.renames
          q: rest.q
          sort: rest.sort
        outputParameters:
        - type: object
          mapping: $.
    - path: /v1/repositories/{workspace}/{repo-slug}/forks
      name: repositories-workspace-repo-slug-forks
      description: REST surface for repositories-workspace-repo_slug-forks.
      operations:
      - method: GET
        name: get
        description: List repository forks
        call: bitbucket-pipelines-repositories.get
        with:
          role: rest.role
          q: rest.q
          sort: rest.sort
        outputParameters:
        - type: object
          mapping: $.
      - method: POST
        name: post
        description: Fork a repository
        call: bitbucket-pipelines-repositories.post
        with:
          _body: rest._body
        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-repositories.get
        outputParameters:
        - type: object
          mapping: $.
      - method: POST
        name: post
        description: Create a webhook for a repository
        call: bitbucket-pipelines-repositories.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-repositories.delete
        outputParameters:
        - type: object
          mapping: $.
      - method: GET
        name: get
        description: Get a webhook for a repository
        call: bitbucket-pipelines-repositories.get
        outputParameters:
        - type: object
          mapping: $.
      - method: PUT
        name: put
        description: Update a webhook for a repository
        call: bitbucket-pipelines-repositories.put
        outputParameters:
        - type: object
          mapping: $.
    - path: /v1/repositories/{workspace}/{repo-slug}/override-settings
      name: repositories-workspace-repo-slug-override-settings
      description: REST surface for repositories-workspace-repo_slug-override-settings.
      operations:
      - method: GET
        name: get
        description: Retrieve the inheritance state for repository settings
        call: bitbucket-pipelines-repositories.get
        outputParameters:
        - type: object
          mapping: $.
      - method: PUT
        name: put
        description: Set the inheritance state for repository settings
        call: bitbucket-pipelines-repositories.put
        outputParameters:
        - type: object
          mapping: $.
    - path: /v1/repositories/{workspace}/{repo-slug}/permissions-config/groups
      name: repositories-workspace-repo-slug-permissions-config-groups
      description: REST surface for repositories-workspace-repo_slug-permissions-config-groups.
      operations:
      - method: GET
        name: get
        description: List explicit group permissions for a repository
        call: bitbucket-pipelines-repositories.get
        outputParameters:
        - type: object
          mapping: $.
    - path: /v1/repositories/{workspace}/{repo-slug}/permissions-config/groups/{group-slug}
      name: repositories-workspace-repo-slug-permissions-config-groups-group-slug
      description: REST surface for repositories-workspace-repo_slug-permissions-config-groups-group_slug.
      operations:
      - method: DELETE
        name: delete
        description: Delete an explicit group permission for a repository
        call: bitbucket-pipelines-repositories.delete
        outputParameters:
        - type: object
          mapping: $.
      - method: GET
        name: get
        description: Get an explicit group permission for a repository
        call: bitbucket-pipelines-repositories.get
        outputParameters:
        - type: object
          mapping: $.
      - method: PUT
        name: put
        description: Update an explicit group permission for a repository
        call: bitbucket-pipelines-repositories.put
        with:
          _body: rest._body
        outputParameters:
        - type: object
          mapping: $.
    - path: /v1/repositories/{workspace}/{repo-slug}/permissions-config/users
      name: repositories-workspace-repo-slug-permissions-config-users
      description: REST surface for repositories-workspace-repo_slug-permissions-config-users.
      operations:
      - method: GET
        name: get
        description: List explicit user permissions for a repository
        call: bitbucket-pipelines-repositories.get
        outputParameters:
        - type: object
          mapping: $.
    - path: /v1/repositories/{workspace}/{repo-slug}/permissions-config/users/{selected-user-id}
      name: repositories-workspace-repo-slug-permissions-config-users-selected-user-id
      description: REST surface for repositories-workspace-repo_slug-permissions-config-users-selected_user_id.
      operations:
      - method: DELETE
        name: delete
        description: Delete an explicit user permission for a repository
        call: bitbucket-pipelines-repositories.delete
        outputParameters:
        - type: object
          mapping: $.
      - method: GET
        name: get
        description: Get an explicit user permission for a repository
        call: bitbucket-pipelines-repositories.get
        outputParameters:
        - type: object
          mapping: $.
      - method: PUT
        name: put
        description: Update an explicit user permission for a repository
        call: bitbucket-pipelines-repositories.put
        with:
          _body: rest._body
        outputParameters:
        - type: object
          mapping: $.
    - path: /v1/repositories/{workspace}/{repo-slug}/src
      name: repositories-workspace-repo-slug-src
      description: REST surface for repositories-workspace-repo_slug-src.
      operations:
      - method: GET
        name: get
        description: Get the root directory of the main branch
        call: bitbucket-pipelines-repositories.get
        with:
          format: rest.format
        outputParameters:
        - type: object
          mapping: $.
      - method: POST
        name: post
        description: Create a commit by uploading a file
        call: bitbucket-pipelines-repositories.post
        with:
          message: rest.message
          author: rest.author
          parents: rest.parents
          files: rest.files
          branch: rest.branch
        outputParameters:
        - type: object
          mapping: $.
    - path: /v1/repositories/{workspace}/{repo-slug}/src/{commit}/{path}
      name: repositories-workspace-repo-slug-src-commit-path
      description: REST surface for repositories-workspace-repo_slug-src-commit-path.
      operations:
      - method: GET
        name: get
        description: Get file or directory contents
        call: bitbucket-pipelines-repositories.get
        with:
          format: rest.format
          q: rest.q
          sort: rest.sort
          max_depth: rest.max_depth
        outputParameters:
        - type: object
          mapping: $.
    - path: /v1/repositories/{workspace}/{repo-slug}/watchers
      name: repositories-workspace-repo-slug-watchers
      description: REST surface for repositories-workspace-repo_slug-watchers.
      operations:
      - method: GET
        name: get
        description: List repositories watchers
        call: bitbucket-pipelines-repositories.get
        outputParameters:
        - type: object
          mapping: $.
    - path: /v1/user/permissions/repositories
      name: user-permissions-repositories
      description: REST surface for user-permissions-repositories.
      operations:
      - method: GET
        name: get
        description: List repository permissions for a user
        call: bitbucket-pipelines-repositories.get
        with:
          q: rest.q
          sort: rest.sort
        outputParameters:
        - type: object
          mapping: $.
    - path: /v1/user/workspaces/{workspace}/permissions/repositories
      name: user-workspaces-workspace-permissions-repositories
      description: REST surface for user-workspaces-workspace-permissions-repositories.
      operations:
      - method: GET
        name: get
        description: List repository permissions in a workspace for a user
        call: bitbucket-pipelines-repositories.get
        with:
          q: rest.q
          sort: rest.sort
        outputParameters:
        - type: object
          mapping: $.
  - type: mcp
    namespace: bitbucket-pipelines-repositories-mcp
    port: 9090
    transport: http
    description: MCP adapter for Bitbucket API — Repositories. One tool per consumed operation, routed inline through this
      capability's consumes block.
    tools:
    - name: list-public-repositories
      description: List public repositories
      hints:
        readOnly: true
        destructive: false
        idempotent: true
      call: bitbucket-pipelines-repositories.get
      with:
        after: tools.after
        role: tools.role
        q: tools.q
        sort: tools.sort
      outputParameters:
      - type: object
        mapping: $.
    - name: list-repositories-workspace
      description: List repositories in a workspace
      hints:
        readOnly: true
        destructive: false
        idempotent: true
      call: bitbucket-pipelines-repositories.get
      with:
        role: tools.role
        q: tools.q
        sort: tools.sort
      outputParameters:
      - type: object
        mapping: $.
    - name: delete-repository
      description: Delete a repository
      hints:
        readOnly: false
        destructive: true
        idempotent: true
      call: bitbucket-pipelines-repositories.delete
      with:
        redirect_to: tools.redirect_to
      outputParameters:
      - type: object
        mapping: $.
    - name: get-repository
      description: Get a repository
      hints:
        readOnly: true
        destructive: false
        idempotent: true
      call: bitbucket-pipelines-repositories.get
      outputParameters:
      - type: object
        mapping: $.
    - name: create-repository
      description: Create a repository
      hints:
        readOnly: false
        destructive: false
        idempotent: false
      call: bitbucket-pipelines-repositories.post
      with:
        _body: tools._body
      outputParameters:
      - type: object
        mapping: $.
    - name: update-repository
      description: Update a repository
      hints:
        readOnly: false
        destructive: false
        idempotent: true
      call: bitbucket-pipelines-repositories.put
      with:
        _body: tools._body
      outputParameters:
      - type: object
        mapping: $.
    - name: list-commits-that-modified-file
      description: List commits that modified a file
      hints:
        readOnly: true
        destructive: false
        idempotent: true
      call: bitbucket-pipelines-repositories.get
      with:
        renames: tools.renames
        q: tools.q
        sort: tools.sort
      outputParameters:
      - type: object
        mapping: $.
    - name: list-repository-forks
      description: List repository forks
      hints:
        readOnly: true
        destructive: false
        idempotent: true
      call: bitbucket-pipelines-repositories.get
      with:
        role: tools.role
        q: tools.q
        sort: tools.sort
      outputParameters:
      - type: object
        mapping: $.
    - name: fork-repository
      description: Fork a repository
      hints:
        readOnly: false
        destructive: false
        idempotent: false
      call: bitbucket-pipelines-repositories.post
      with:
        _body: tools._body
      outputParameters:
      - type: object
        mapping: $.
    - name: list-webhooks-repository
      description: List webhooks for a repository
      hints:
        readOnly: true
        destructive: false
        idempotent: true
      call: bitbucket-pipelines-repositories.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-repositories.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-repositories.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-repositories.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-repositories.put
      outputParameters:
      - type: object
        mapping: $.
    - name: retrieve-inheritance-state-repository-settings
      description: Retrieve the inheritance state for repository settings
      hints:
        readOnly: true
        destructive: false
        idempotent: true
      call: bitbucket-pipelines-repositories.get
      outputParameters:
      - type: object
        mapping: $.
    - name: set-inheritance-state-repository-settings
      description: Set the inheritance state for repository settings
      hints:
        readOnly: false
        destructive: false
        idempotent: true
      call: bitbucket-pipelines-repositories.put
      outputParameters:
      - type: object
        mapping: $.
    - name: list-explicit-group-permissions-repository
      des

# --- truncated at 32 KB (36 KB total) ---
# Full source: https://raw.githubusercontent.com/api-evangelist/bitbucket-pipelines/refs/heads/main/capabilities/bitbucket-pipelines-repositories.yaml