Pharmacology

A patient goes to his family doctor complaining of persistent and severe headaches. His physician diagnoses migraine headaches and prescribes sumatriptan. What is the mechanism of action of this drug?