> ## Documentation Index
> Fetch the complete documentation index at: /llms.txt
> Use this file to discover all available pages before exploring further.

# Bitbucket

> Bitbucket is a Git-based code hosting and collaboration platform supporting private and public repositories, enabling teams to manage and review code through pull requests and inte

Bitbucket is a Git-based code hosting and collaboration platform supporting private and public repositories, enabling teams to manage and review code through pull requests and integrations

`bitbucket` · **110 tools** · no triggers

## Connect it

```bash
run auth bitbucket
run auth bitbucket --scope team    # shared with the organization
```

Or from the [Integrations page](https://app.boxd.sh/integrations) in the console. See [Connections](/guides/integrations/connections.md) for personal versus shared, and who may remove one.

## Use it

```bash
run bitbucket          # common commands
run bitbucket --all    # every command
```

```ts
import { bitbucket } from "@boxd/run";
```

## Common tools

| Tool | What it does |
| - | - |
| `approve-pull-request` | Tool to approve a pull request as the authenticated user. Use when you need to formally approve changes in a pull request review process. |
| `browse-repository-path` | Tool to retrieve content for a file path or browse directory contents at a specified revision in a Bitbucket repository. |
| `create-branch` | Creates a new branch in a Bitbucket repository from a target commit hash; the branch name must be unique, adhere to Bitbucket's naming conventions... |
| `create-issue` | Creates a new issue in a Bitbucket repository, setting the authenticated user as reporter; ensures assignee (if provided) has repository access, and... |
| `create-issue-comment` | Adds a new comment with markdown support to an existing Bitbucket issue. |
| `create-pull-request` | Creates a new pull request in a specified Bitbucket repository, ensuring the source branch exists and is distinct from the (optional) destination branch. |
| `create-pull-request-comment` | Creates a new comment on a Bitbucket pull request. Supports top-level comments, threaded replies, and inline code comments. |
| `create-repositories-commits2` | Tool to list commits from a revision using POST method. Identical to GET endpoint but allows sending include/exclude parameters in request body to... |
| `create-repository` | Creates a new Bitbucket 'git' repository in a specified workspace, defaulting to the workspace's oldest project if `project_key` is not provided. |
| `decline-pull-request` | Decline a Bitbucket Cloud pull request via the REST API. Use this action when you need to reject a pull request that should not be merged. |
| `delete-commit-comment` | Permanently deletes a specific comment on a commit. Use when removing outdated, incorrect, or unwanted feedback on a commit. |
| `delete-issue` | Permanently deletes a specific issue, identified by its `issue_id`, from the repository specified by `repo_slug` within the given `workspace`. |
| `delete-pull-request-comment` | Permanently deletes a specific pull request comment (top-level, inline, or threaded reply). |
| `delete-repository` | Permanently deletes a specified Bitbucket repository; this action is irreversible and does not affect forks. |
| `get-branch` | Retrieves detailed information about a specific branch in a Bitbucket repository. |
| `get-commit-changes` | Tool to retrieve a page of changes made in a specified commit, showing all changed files with their change statistics (lines added/removed, status). |
| `get-commit-comment` | Retrieves a specific comment from a commit by its ID. Use when you need to fetch details of a particular commit comment including content, author... |
| `get-commit-diff` | Tool to retrieve the unified diff between two provided revisions or for a single commit in a Bitbucket repository. |
| `get-current-user2` | Tool to retrieve complete profile information for the currently authenticated Bitbucket user. |
| `get-file-from-repository` | Retrieves a specific file's content from a Bitbucket repository at a given commit (hash, branch, or tag), failing if the file path is invalid for that commit. |
| `get-pull-request` | Get a single pull request by ID with complete details. |
| `get-pull-request-comment` | Tool to retrieve a specific comment from a pull request by its ID. |
| `get-pull-request-commits` | Tool to retrieve commits for a specified pull request. Use when reviewing the commit history of a PR or analyzing changes included in a pull request. |
| `get-pull-request-diff` | Tool to fetch the unified diff for a Bitbucket pull request (follows 302 redirect to repository diff). |
| `get-pull-request-diffstat` | Tool to get the diffstat for a Bitbucket pull request, showing all changed files with their change statistics (lines added/removed, status). |

> [accordion] All 110 tools
>
> | Tool | What it does |
> | - | - |
> | `approve-pull-request` | Tool to approve a pull request as the authenticated user. Use when you need to formally approve changes in a pull request review process. |
> | `browse-repository-path` | Tool to retrieve content for a file path or browse directory contents at a specified revision in a Bitbucket repository. |
> | `create-branch` | Creates a new branch in a Bitbucket repository from a target commit hash; the branch name must be unique, adhere to Bitbucket's naming conventions... |
> | `create-issue` | Creates a new issue in a Bitbucket repository, setting the authenticated user as reporter; ensures assignee (if provided) has repository access, and... |
> | `create-issue-comment` | Adds a new comment with markdown support to an existing Bitbucket issue. |
> | `create-pull-request` | Creates a new pull request in a specified Bitbucket repository, ensuring the source branch exists and is distinct from the (optional) destination branch. |
> | `create-pull-request-comment` | Creates a new comment on a Bitbucket pull request. Supports top-level comments, threaded replies, and inline code comments. |
> | `create-repositories-commit-reports-annotations` | Adds multiple annotations to a commit report in bulk. Use when you need to add code analysis findings (vulnerabilities, code smells, bugs) to a... |
> | `create-repositories-commits2` | Tool to list commits from a revision using POST method. Identical to GET endpoint but allows sending include/exclude parameters in request body to... |
> | `create-repository` | Creates a new Bitbucket 'git' repository in a specified workspace, defaulting to the workspace's oldest project if `project_key` is not provided. |
> | `create-snippet-comment` | Posts a new top-level comment or a threaded reply to an existing comment on a specified Bitbucket snippet. |
> | `create-teams-pipelines-config-variables` | Creates a team-level pipeline configuration variable in Bitbucket. |
> | `create-users-pipelines-config-variables` | Creates a user-level pipeline variable for Bitbucket pipelines. |
> | `decline-pull-request` | Decline a Bitbucket Cloud pull request via the REST API. Use this action when you need to reject a pull request that should not be merged. |
> | `delete-commit-comment` | Permanently deletes a specific comment on a commit. Use when removing outdated, incorrect, or unwanted feedback on a commit. |
> | `delete-issue` | Permanently deletes a specific issue, identified by its `issue_id`, from the repository specified by `repo_slug` within the given `workspace`. |
> | `delete-pull-request-comment` | Permanently deletes a specific pull request comment (top-level, inline, or threaded reply). |
> | `delete-repositories-commit-reports-annotations` | Deletes a single annotation matching the provided ID from a commit report. |
> | `delete-repository` | Permanently deletes a specified Bitbucket repository; this action is irreversible and does not affect forks. |
> | `delete-snippets-watch` | Stops watching a specific snippet. Use when you want to unsubscribe from notifications for a snippet. |
> | `delete-user-pipeline-variable` | Permanently deletes a user-level pipeline configuration variable identified by its UUID. |
> | `get-branch` | Retrieves detailed information about a specific branch in a Bitbucket repository. |
> | `get-commit-build-status` | Get a specific build status for a commit in Bitbucket. Use when you need to check the status of a particular build/CI run for a commit. |
> | `get-commit-changes` | Tool to retrieve a page of changes made in a specified commit, showing all changed files with their change statistics (lines added/removed, status). |
> | `get-commit-comment` | Retrieves a specific comment from a commit by its ID. Use when you need to fetch details of a particular commit comment including content, author... |
> | `get-commit-diff` | Tool to retrieve the unified diff between two provided revisions or for a single commit in a Bitbucket repository. |
> | `get-current-user2` | Tool to retrieve complete profile information for the currently authenticated Bitbucket user. |
> | `get-deployment-environment-variables` | Retrieves deployment environment level variables for a specific Bitbucket repository environment. |
> | `get-file-from-repository` | Retrieves a specific file's content from a Bitbucket repository at a given commit (hash, branch, or tag), failing if the file path is invalid for that commit. |
> | `get-hook-events` | Retrieves a paginated list of all valid webhook events for a specified entity type (repository or workspace). |
> | `get-openid-configuration` | Retrieves the OpenID Connect discovery configuration for Bitbucket Pipelines OIDC. |
> | `get-pull-request` | Get a single pull request by ID with complete details. |
> | `get-pull-request-comment` | Tool to retrieve a specific comment from a pull request by its ID. |
> | `get-pull-request-commits` | Tool to retrieve commits for a specified pull request. Use when reviewing the commit history of a PR or analyzing changes included in a pull request. |
> | `get-pull-request-diff` | Tool to fetch the unified diff for a Bitbucket pull request (follows 302 redirect to repository diff). |
> | `get-pull-request-diffstat` | Tool to get the diffstat for a Bitbucket pull request, showing all changed files with their change statistics (lines added/removed, status). |
> | `get-raw-file-content` | DEPRECATED: Use BITBUCKET\_GET\_FILE\_FROM\_REPOSITORY instead. Tool to retrieve the raw content of a file from a Bitbucket repository at a specified commit, branch, or tag. |
> | `get-repositories-branching-model` | Return the branching model as applied to the repository. Use when you need to understand the repository's branch workflow configuration, including... |
> | `get-repositories-commit` | Tool to retrieve detailed information about a specific commit in a Bitbucket repository. |
> | `get-repositories-commit-comments` | Retrieves all comments on a specific commit in a Bitbucket repository. |
> | `get-repositories-commit-report` | Returns a single report matching the provided ID from a commit. |
> | `get-repositories-commit-reports` | Tool to get reports linked to a specific commit. Use when you need to retrieve analysis results, test reports, security scans, or code coverage data... |
> | `get-repositories-commit-reports-annotations` | Returns a single annotation matching the provided ID from a commit report. |
> | `get-repositories-commit-statuses` | Returns all build statuses (e.g., CI/CD pipeline results) for a specific commit. |
> | `get-repositories-effective-branching-model` | Retrieves the effective branching model for a Bitbucket repository, showing which branching model is currently applied (including any inheritance... |
> | `get-repositories-environments2` | Retrieve detailed information about a specific deployment environment in a Bitbucket repository. |
> | `get-repositories-filehistory` | Returns a paginated list of commits that modified the specified file. |
> | `get-repositories-issues-vote` | Tool to check whether the authenticated user has voted for a specific issue in a Bitbucket repository. |
> | `get-repositories-merge-base` | Get the merge base (best common ancestor) between two commits in a Bitbucket repository. |
> | `get-repositories-pipelines2` | Retrieve a specified pipeline from a Bitbucket repository. Use when you need to get detailed information about a specific pipeline execution... |
> | `get-repositories-pipelines-config-caches` | Retrieves the repository pipelines caches. Use when you need to list all caches configured for Bitbucket Pipelines in a specific repository. |
> | `get-repositories-pipelines-config-runners` | Retrieves the list of self-hosted runners configured for a repository's pipelines. |
> | `get-repositories-pipelines-config-schedules` | Retrieves configured pipeline schedules for a Bitbucket repository. |
> | `get-repositories-pipelines-config-ssh-known-hosts` | Retrieves repository-level SSH known hosts configured for Bitbucket Pipelines. |
> | `get-repositories-pipelines-config-variables` | Retrieves repository-level pipeline variables for a specific Bitbucket repository. |
> | `get-repositories-pipelines-steps` | Retrieves all steps for a given pipeline. Use when you need to inspect the individual steps of a pipeline execution, including their state, duration, and commands. |
> | `get-repositories-pullrequests-activity` | Get paginated activity log for all pull requests in a repository. |
> | `get-repositories-pullrequests-comments` | Retrieves a paginated list of comments on a specific pull request in a Bitbucket repository. |
> | `get-repositories-pullrequests-statuses` | Returns all build statuses (e.g., CI/CD pipeline results) for a specific pull request. |
> | `get-repositories-refs` | Returns the branches and tags in the repository. Use when you need to list all refs (both branches and tags) in a single API call with optional... |
> | `get-repositories-refs-tags` | Retrieves detailed information about a specific tag in a Bitbucket repository. |
> | `get-repositories-src` | Lists the contents of the root directory on the repository's main branch without needing to specify a commit or branch. |
> | `get-repositories-watchers` | Retrieves a paginated list of all the watchers on the specified repository. |
> | `get-repository` | Retrieves detailed information about a specific repository in a Bitbucket workspace. |
> | `get-repository-patch` | Tool to retrieve the git patch content for a Bitbucket repository at a specified revision or commit range. |
> | `get-snippet` | Retrieves a specific Bitbucket snippet by its encoded ID from an existing workspace, returning its metadata and file structure. |
> | `get-snippets-watch` | Checks if the current user is watching a specific snippet. Use when you need to verify watch status for a snippet. |
> | `get-ssh-latest-keys` | Retrieves a paginated list of SSH keys for a specified Bitbucket user. |
> | `get-user` | Retrieves public profile information for a specific Bitbucket user by username or UUID. |
> | `get-user-emails` | Returns all the authenticated user's email addresses, both confirmed and unconfirmed. |
> | `get-user-emails2` | Retrieves details about a specific email address for the authenticated user. |
> | `get-user-permissions-repositories` | Returns an object for each repository the caller has explicit access to, including their permission level. |
> | `get-user-permissions-workspaces` | Retrieves workspace memberships and permission levels for the authenticated user. |
> | `get-user-workspaces` | Tool to retrieve all workspaces accessible to the authenticated user. |
> | `get-workspace` | Retrieves detailed information about a specific Bitbucket workspace. |
> | `get-workspaces-pullrequests` | Tool to get all workspace pull requests authored by a specified user. |
> | `get-workspaces-search-code` | Tool to search for code in the repositories of the specified workspace. |
> | `list-branches` | Lists branches in a Bitbucket repository with optional server-side filtering by name pattern (BBQL) and sorting. |
> | `list-commits` | Tool to retrieve a page of commits from a Bitbucket repository. |
> | `list-commits-from-revision` | Tool to list commits starting from a specific revision in a Bitbucket repository. |
> | `list-commits-on-master` | Lists commits on the master branch of a Bitbucket repository. |
> | `list-deployments` | Lists deployments for a specified Bitbucket repository. Use when you need to view deployment history and status across environments. |
> | `list-issues` | Lists issues in a Bitbucket repository with optional filtering by state, priority, kind, or assignee. |
> | `list-pipelines` | Tool to find pipelines in a Bitbucket repository. Returns pipeline metadata including state, trigger, and duration. |
> | `list-pull-requests` | Lists pull requests in a specified, accessible Bitbucket repository, optionally filtering by state (OPEN, MERGED, DECLINED). |
> | `list-pull-request-tasks` | Lists all tasks associated with a pull request in a Bitbucket repository. |
> | `list-repositories` | Retrieves a paginated list of all public repositories on Bitbucket. |
> | `list-repositories-environments` | List all deployment environments configured for a Bitbucket repository. |
> | `list-repositories-in-workspace` | Lists repositories in a specified Bitbucket workspace, accessible to the authenticated user, with options to filter by role or query string, and sort results. |
> | `list-repository-forks` | Retrieves a paginated list of all forks for a specific repository in a Bitbucket workspace. |
> | `list-repository-paths` | Lists file and directory entries under a repository path at a given revision, with optional breadth-first recursion via max\_depth for repository traversal and scanning. |
> | `list-snippets` | Returns all snippets accessible to the authenticated user. Use when you need to discover or list snippets, optionally filtered by role (owner, contributor, or member). |
> | `list-tags` | Lists tags in a Bitbucket repository with optional server-side filtering by name pattern or commit hash (BBQL) and sorting. |
> | `list-versions` | Lists versions (milestones) in a Bitbucket repository's issue tracker. |
> | `list-workspace-members` | Lists all members of a specified Bitbucket workspace; the workspace must exist. |
> | `list-workspace-projects` | Lists projects in a specified Bitbucket workspace. Use when you need to retrieve all projects belonging to a workspace. |
> | `list-workspaces` | Lists Bitbucket workspaces accessible to the authenticated user, optionally filtered and sorted. |
> | `merge-pull-request` | Tool to merge a Bitbucket Cloud pull request via the REST API. |
> | `request-pull-request-changes` | Tool to request changes on a pull request as the authenticated user. |
> | `resolve-pull-request-comment` | Tool to resolve or reopen a pull request comment thread. Use when marking a comment as addressed during review or reopening a previously resolved thread. |
> | `search-team-code` | Search for code in repositories of a specified team. Matches can occur in file content or paths. |
> | `search-user-repositories-code` | Tool to search for code in the repositories of a specified user. |
> | `stop-pipeline` | Signal the stop of a pipeline and all of its steps that have not completed yet. |
> | `update-insights-projects-repos-commits-reports` | Create or update an insight report for a commit. Creates a new report if it doesn't exist, or replaces the existing one if a report already exists... |
> | `update-issue` | Updates an existing issue in a Bitbucket repository by modifying specified attributes; requires `workspace`, `repo_slug`, `issue_id`, and at least... |
> | `update-pull-request` | Tool to update an existing pull request's editable fields (e.g., title, description, reviewers) via the Bitbucket Cloud API. |
> | `update-repositories-commit-comments` | Updates the contents of a comment on a commit. Use when you need to modify an existing comment's text on a commit. |
> | `update-repositories-commit-reports-annotations` | Creates or updates an individual annotation for a commit report. |
> | `update-teams-pipelines-config-variables` | Updates a team-level pipeline configuration variable in Bitbucket. |
> | `update-users-pipelines-config-variables` | Updates a user-level pipeline variable for Bitbucket pipelines. |

[Open Bitbucket in the console →](https://app.boxd.sh/integrations/detail/bitbucket)
