A well tool for cementing a portion of a well includes a cement retainer assembly and a capsule connected to the cement retainer assembly. The cement retainer assembly is configured to be disposed within a wellbore, and includes a ported sub and a cement retainer. The ported sub includes a port to flow cement out of the cement retainer assembly and into an annulus of the wellbore. The capsule includes a body defining an interior chamber of the capsule, where the interior chamber is configured to retain a fluid, and the capsule is configured to be disposed at a location within the wellbore and downhole of the cement retainer assembly.