The A-12 was designed as a replacement U-2. It carried no armament. It also predates the SR-71, which was developed due to the U-2 that was shot down, and the subsequent treaty between the USA and USSR banning manned overflights.
By the time the A-12 was ready, it had no purpose(since it's cameras could only look straight down). So they made the SR-71, which had side-view capabilities.
The YF-12 was the only Blackbird capable of shooting anything.
It was intended for bomber and interceptor tasks.
Only the interceptor was ever built, and only 3 prototypes.
Seems no one wanted to foot the bill for the 93 F-12s that were needed to protect North America from enemy bombers, and the bomber variant was competing with the Valkyrie(which no one wanted to admit was obsolete before it ever left the ground) so the project was killed.
Looking at dates, the Foxbat COULD have been birthed as a counter to the A-12, but it's doubtful.
I think countering the Valkyrie was more likely.