@atlassian-dc-mcp/bitbucket 0.32.0 → 0.34.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/src/index.ts CHANGED
@@ -78,6 +78,16 @@ server.tool(
78
78
  }
79
79
  );
80
80
 
81
+ server.tool(
82
+ "bitbucket_createBranch",
83
+ "Create a branch in a Bitbucket repository, forked from a branch, tag or commit. Use this before bitbucket_createPullRequest when the source branch does not exist yet. The response contains the new branch's 'id' (e.g. 'refs/heads/feature/my-branch'), which is what bitbucket_createPullRequest expects as fromRefId.",
84
+ bitbucketToolSchemas.createBranch,
85
+ async ({ projectKey, repositorySlug, name, startPoint }) => {
86
+ const result = await bitbucketService.createBranch(projectKey, repositorySlug, name, startPoint);
87
+ return formatToolResponse(result);
88
+ }
89
+ );
90
+
81
91
  server.tool(
82
92
  "bitbucket_getCommits",
83
93
  "Get commits for a Bitbucket repository",
@@ -179,6 +189,16 @@ server.tool(
179
189
  }
180
190
  );
181
191
 
192
+ server.tool(
193
+ "bitbucket_getBranchDiff",
194
+ "Get the diff between two branches, tags or commits — including branches that have no pull request yet. Returns the same comparison as the Bitbucket 'compare' view: changes reachable from sourceBranch but not from targetBranch, rendered as a unified diff. targetBranch defaults to the repository's default branch. Use this to review work in progress before a PR exists; once a PR exists, prefer bitbucket_getPullRequestChanges + bitbucket_getPullRequestDiff.",
195
+ bitbucketToolSchemas.getBranchDiff,
196
+ async ({ projectKey, repositorySlug, sourceBranch, targetBranch, path, contextLines, srcPath, whitespace, output }) => {
197
+ const result = await bitbucketService.getBranchDiff(projectKey, repositorySlug, sourceBranch, targetBranch, path, contextLines, srcPath, whitespace, output);
198
+ return formatToolResponse(result);
199
+ }
200
+ );
201
+
182
202
  server.tool(
183
203
  "bitbucket_createPullRequest",
184
204
  "Create a new pull request in a Bitbucket repository. Supports fork-based pull requests by passing fromProjectKey/fromRepositorySlug when the source repository differs from the destination (projectKey/repositorySlug). IMPORTANT: Before creating a PR, use bitbucket_getRequiredReviewers to fetch required reviewers for the source and target branches to ensure the PR is not created without mandatory reviewers.",