You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
feat(bitbucket): improve updatePullRequest tool descriptions to prevent missing version parameter
LLMs frequently call updatePullRequest without the required version parameter because
the tool description didn't explain where to obtain it. Added explicit guidance to:
- getPullRequest description: mentions it returns version needed for updates
- updatePullRequest description: states version must be fetched first
- version param description: directs callers to bitbucket_getPullRequest
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
version: z.number().describe("The current version of the pull request (required for optimistic locking)"),
830
+
version: z.number().describe("The current version of the pull request (required for optimistic locking). Obtain this by calling bitbucket_getPullRequest first."),
831
831
title: z.string().optional().describe("The new title for the pull request"),
832
832
description: z.string().optional().describe("The new description for the pull request"),
833
833
reviewers: z.array(z.string()).optional().describe("Optional array of reviewer usernames to set"),
Copy file name to clipboardExpand all lines: packages/bitbucket/src/index.ts
+2-2Lines changed: 2 additions & 2 deletions
Original file line number
Diff line number
Diff line change
@@ -85,7 +85,7 @@ server.tool(
85
85
86
86
server.tool(
87
87
"bitbucket_getPullRequest",
88
-
"Get a specific pull request by ID. Returns full details including title, description, reviewers, participants, author, source/target branches, and current state.",
88
+
"Get a specific pull request by ID. Returns full details including title, description, reviewers, participants, author, source/target branches, current state, and version (needed for bitbucket_updatePullRequest).",
"Update the title, description, reviewers, destination branch or draft status of an existing pull request. IMPORTANT: The reviewers parameter replaces ALL existing reviewers. If you want to preserve existing reviewers, first fetch the current PR details (using bitbucket_getPullRequests filtered by ID) and include those reviewers along with any new ones you want to add.",
177
+
"Update the title, description, reviewers, destination branch or draft status of an existing pull request. IMPORTANT: You MUST first call bitbucket_getPullRequest to get the current 'version' number — this is required for optimistic locking and the call will fail without it. The reviewers parameter replaces ALL existing reviewers. If you want to preserve existing reviewers, include those from the current PR details along with any new ones you want to add.",
0 commit comments