> This page is for Workforce.

> For clean Markdown of any page, append .md to the page URL.
> For a complete documentation index, see https://docs.merge.dev/llms.txt.
> For AI client integration (Claude Code, Cursor, etc.), connect to the MCP server at https://docs.merge.dev/_mcp/server.

# Bitbucket

**Authentication:** OAuth. See [Magic Link](/merge-agent-handler/features/magic-link) for the runtime auth flow, or [Application credentials](/merge-agent-handler/admin-setup/add-oauth-credentials) to bring your own OAuth app.

## Sample use cases

* List open pull requests in the `acme/api` repo that haven't had a review in 3 days.
* Open a pull request from `feature/auth` into `main` with the commit log as the body.
* Find every repo with no commits in the last 90 days for archive review.

## Available Tools

#### list_branches

List repository branches

#### get_branch

Get branch details by name

#### create_branch

Create a new branch

#### delete_branch

Delete a branch

#### get_default_branch

Get repository default branch

#### list_commits

List repository commits with filters

#### get_commit

Get commit details by hash

#### get_commit_diff

Get commit diff

#### approve_commit

Approve a commit

#### unapprove_commit

Remove commit approval

#### list_commit_statuses

List commit build statuses

#### list_commit_comments

List commit comments

#### list_pipelines

List repository pipelines

#### get_pipeline

Get pipeline details by UUID

#### trigger_pipeline

Trigger a new pipeline run

#### stop_pipeline

Stop a running pipeline

#### list_pipeline_steps

List pipeline steps

#### get_pipeline_step

Get pipeline step details

#### get_pipeline_step_log

Get pipeline step logs

#### list_pipeline_variables

List pipeline variables

#### list_pullrequests

List pull requests with filtering options

#### get_pullrequest

Get pull request details by ID

#### create_pullrequest

Create a new pull request

#### update_pullrequest

Update pull request details

#### merge_pullrequest

Merge a pull request

#### decline_pullrequest

Decline a pull request

#### approve_pullrequest

Approve a pull request

#### unapprove_pullrequest

Remove approval from a pull request

#### list_pullrequest_comments

List pull request comments

#### create_pullrequest_comment

Add a comment to a pull request

#### list_pullrequest_commits

List pull request commits

#### get_pullrequest_diff

Get pull request diff

#### list_pullrequest_statuses

List pull request build statuses

#### get_pullrequest_activity

Get pull request activity log

#### request_pullrequest_changes

Request changes on a pull request

#### list_repositories

List repositories in a workspace with pagination

#### get_repository

Get repository details by slug

#### create_repository

Create a new repository in a workspace

#### update_repository

Update repository settings

#### delete_repository

Delete repository permanently

#### list_repository_forks

List repository forks

#### fork_repository

Fork a repository

#### list_repository_watchers

List repository watchers

#### get_current_user

Get authenticated user profile

#### list_user_emails

List user email addresses

#### list_workspaces

List accessible workspaces

#### get_workspace

Get workspace details

#### list_workspace_members

List workspace members

#### list_webhooks

List repository webhooks

#### get_webhook

Get webhook details by UUID

#### create_webhook

Create a repository webhook

#### update_webhook

Update webhook configuration

#### delete_webhook

Delete webhook permanently