Something in the back of my mind tells me I have seen an extension to do something like that, but I can’t remember or find it. Maybe someone with a better memory will chime in. In the meantime, here’s a (slightly tedious) way using built-in tools:
Place an instance of your dome at a suitable location near one end of a segment in the top of the wall. Use the move+copy tool’s array capabilities to make multiple copies along that segment. If a known spacing is required, move+copy one to that spacing and then immediately type *5 to repeat the copy 5 times (obviously, change the number to cleanly fill the edge). You can immediately type another *N value to try other numbers of copies. If a known number is required, move+copy the first dome to the other end of the edge and then immediately type /N.
Repeat this process for each segment of the top of the wall (yeah, I said “tedious”).