Honestly, the wording is a bit vague. Cantrips are spells, but this isn't a cantrip. Yet it's not a weapon attack. Really, from what I can tell, it's the only thing quite like this in the game; It's a spell attack, but not in any spellbook... Its unique. I don't think WotC knew quite what to call it. But they certainly do call it a spell attack, and it's certainly not any sort of a melee or weapon attack. They could've called it a "ranged attack" and left out the weapon keyword, but they didn't.
The fact that they decided to call it a spell is what convinces me it works.
The fact that they decided to call it a spell is what convinces me it works.