Federal prosecutor says a suspect with a mental health history planned a knife-and-hammer attack in the name of the Islamic State.