Functions as a 5-hydroxytryptamine (serotonin) receptor (PubMed:11100728, PubMed:12783521, PubMed:23023001). This receptor is a ligand-gated anion-specific ion channel, selective for chloride ions (PubMed:11100728, PubMed:15878844). Relays a long-range endocrine signal from the body cavity neurons to modulate distal adipose triglyceride lipase atgl-1 function, via the nuclear receptor nhr-76 (PubMed:24120942). Together with the G-protein coupled serotonin receptor ser-1 involved in male mating behavior (PubMed:16291940). May mediate an inhibitory effect of serotonin on egg laying (PubMed:16291940). Involved in regulating locomotory behavior, perhaps by modulating interneuronal signaling, acting in concert with G-protein coupled serotonin receptor ser-4 (PubMed:19193891, PubMed:23023001). In the presence of food, plays a role in initiating and extending dwelling behavior, perhaps acting in AIY, RIF and ASI neurons, in opposition to neuropeptide PDF-mediated signaling (PubMed:23972393). Plays a role in aversive learning upon exposure to pathogens such as Gram-negative bacterium P.aeruginosa strain PA14; perhaps acting in interneurons in response to serotonin released by the serotonergic ADF neurons (PubMed:16281027). Expressed in a subset of muscles, and head and tail neurons, including RME and GABAergic ventral nerve cord neurons (PubMed:23023001). Expressed in AIY, RME, RID, RIF, ASI, DD1-6, and PVN neurons (PubMed:23972393). Expressed in all body-wall muscles in L3 stage larvae, and at a lower level in L4 stage larvae and adults. Belongs to the ligand-gated ion channel (TC 1.A.9) family.