Birmingham Crown Court heard how McLeod, who was diagnosed with paranoid schizophrenia, had been out of contact with health services since being released from prison that April.
Prosecutor Karim Khalil QC said mental health services had eventually made contact with McLeod and he had been due a "face-to-face" assessment with a psychiatrist but had "refused" to attend.
He was last spoken to on the phone by a mental health nurse on 3 September, and a new date was set for three weeks after his stabbing spree.
The court heard how on his release from prison in April 2020, mental health services struggled to trace him, with a psychiatrist giving evidence they were "not informed of his whereabouts".
It was only when they received a referral from McLeod's GP that mental health workers were able to see him.
"He was last spoken to on the phone by a mental health nurse on September 3, 2020," said Mr Khalil.
"This was just four days before his arrest for these offences."
The court heard how McLeod had armed himself with a knife on the night of the attack, getting a taxi home to pick up another, before returning to the city centre, part-way through his spree.
He had "aimed at parts of the body, namely the head, neck and chest where the most severe injuries would be likely to be caused," said Mr Khalil.
"We suggest the fact some victims sustained physical injuries that weren't as serious was purely by chance, rather than by design," he added.
Stab killer missed psychiatric assessment - BBC News