Ms. McCray implores those she meets to take the course, which includes discussions and role playing. So far, she has not been able to get the mayor to take it. (“He’s kind of busy,” she said.)

But the vast majority of city spending on the program goes to more than 40 other endeavors, such as a crime victim advocate program; social and emotional learning in public schools; and a corps of young behavioral health clinicians paid by the city to work at nonprofits for three years.

Even as the city has poured money into mental health programs and training, nonprofit directors said they still struggle with providing treatment, citing inadequate Medicaid reimbursement rates and even less generous reimbursements from commercial insurers. Some have closed their doors; others have chosen to stop providing mental health services.

David Woodlock, president of the Institute for Community Living and a former top state health official, praised Ms. McCray for her courage in taking on mental health issues. But he bemoaned the inadequacy of state funding, and called the city’s contracting process broken.

“People are being asked to do more in this system that is not built for expansion,” he said.

Helping the seriously mentally ill remains a challenge, especially in a crisis. Those moments often involve the police, and have led to confrontations where officers have been injured, and the person the officers came to help getting physically hurt or killed.

During one such episode in 2012, a man whose family members called 911 to try to help him, attacked one of the responding officers, stabbing him in the neck and face.

The man, Benedy Abreu, 31, served five years in prison and is now in a program funded through Thrive to help those with serious mental illness and a criminal past. He receives regular visits from a psychiatrist and a peer counselor.