request_changes_pr
Request changes on a Bitbucket pull request to indicate required modifications before approval. Submit feedback to developers for specific repository pull requests.
Instructions
Request changes on a pull request.
Args:
repo_slug: Repository slug
pr_id: Pull request ID
Returns:
Confirmation of change request
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| repo_slug | Yes | ||
| pr_id | Yes |
Implementation Reference
- src/server.py:1020-1039 (handler)MCP tool handler function for 'request_changes_pr'. Decorated with @mcp.tool() for registration, handles input validation implicitly via type hints, gets Bitbucket client, calls the core method, and formats response.@mcp.tool() @handle_bitbucket_error @formatted def request_changes_pr(repo_slug: str, pr_id: int) -> dict: """Request changes on a pull request. Args: repo_slug: Repository slug pr_id: Pull request ID Returns: Confirmation of change request """ client = get_client() result = client.request_changes_pr(repo_slug, pr_id) return { "pr_id": pr_id, "requested_by": result.get("user", {}).get("display_name"), }
- src/bitbucket_client.py:1042-1058 (helper)Helper method in BitbucketClient that executes the actual Bitbucket API POST request to /pullrequests/{pr_id}/request-changes endpoint.def request_changes_pr( self, repo_slug: str, pr_id: int ) -> dict[str, Any]: """Request changes on a pull request. Args: repo_slug: Repository slug pr_id: Pull request ID Returns: Request info """ result = self._request( "POST", self._repo_path(repo_slug, "pullrequests", str(pr_id), "request-changes"), ) return self._require_result(result, "request changes on PR", f"#{pr_id}")
- src/server.py:1020-1022 (registration)Registration of the tool via @mcp.tool() decorator in FastMCP framework.@mcp.tool() @handle_bitbucket_error @formatted