-
Notifications
You must be signed in to change notification settings - Fork 0
Bitbucket Workflows
Typical agent tasks against Bitbucket Data Center. Typed tools cover the pull-request lifecycle; repository browsing and downloads also go through the generic tools.
bitbucket_list_repositories({ projectKey: "MCP" })
bitbucket_list_commits({ projectKey: "MCP", repositorySlug: "backend", limit: 20 })
bitbucket_list_pull_requests({ projectKey: "MCP", repositorySlug: "backend", state: "OPEN" })
bitbucket_get_pull_request({ projectKey: "MCP", repositorySlug: "backend", pullRequestId: 42 })
bitbucket_create_pull_request({
projectKey: "MCP",
repositorySlug: "backend",
pullRequest: {
title: "Fix race in cache loader",
description: "See MCP-123",
fromRef: { id: "refs/heads/bugfix/cache-race" },
toRef: { id: "refs/heads/main" }
}
})
Use atlassian_describe_operation({ operationId: "bitbucket.pullrequests.create" })
for the exact request shape.
bitbucket_add_pull_request_comment({
projectKey: "MCP",
repositorySlug: "backend",
pullRequestId: 42,
text: "LGTM with one nit on line 87."
})
Approve/unapprove and decline/reopen are registry operations
(bitbucket.pullrequests.approve, .decline, .reopen, …) via
atlassian_execute_operation.
bitbucket_merge_pull_request({
projectKey: "MCP",
repositorySlug: "backend",
pullRequestId: 42,
version: 3
})
version is the PR's current version (from bitbucket_get_pull_request) —
it guards against merging a PR that changed since you looked. Merges are
risky; they are hidden unless the server runs with
--exposure-tier=risky.
Diffs, raw file contents, and repository archives are binary/text downloads handled by the file-transfer path (file root required for saving to disk):
atlassian_execute_operation({
operationId: "bitbucket.pullrequests.diff",
pathParams: { projectKey: "MCP", repositorySlug: "backend", pullRequestId: 42 },
downloadPath: "/abs/path/under/file-root/pr-42.diff"
})
See Attachments and Large Results for
downloadPath / outputPath rules and limits.
- Bitbucket repository deletion and other administrative operations sit in higher tiers or are permanently excluded; check Exposure Tiers when an operation is not discoverable.
- Structured errors carry
status,operationId, and sanitized upstream details; a 409 on merge means the version check failed — re-read the PR.
中文版 · English is the authoritative version.
Documentation source: docs/wiki/
— changes are reviewed via pull request; edits made directly in this wiki
are overwritten by the next sync. · 中文首页
Get started
Workflows
Reference
- Exposure tiers
- Attachments and large results
- Security model
- Compatibility matrix
- Upgrade guide
- Troubleshooting