8:10 AM PT -- According to new legal docs ... Glennon was interviewed Monday by the Department of Child Services, which will recommend he get custody of their son, James, pending its investigation. The docs say Glennon believes Portwood is "currently unable to provide a safe, stable, and secure environment for James on an ongoing basis due to her frequent refusal and/or failure to take medicines prescribed to treat her mental-health conditions, among other concerns."
Amber will be in court again later Wednesday for the emergency custody hearing with Andrew.
We've also learned Gary Shirley -- her ex and father of her 10-year-old daughter, Leah -- was at court Wednesday for Amber's criminal hearing. He was with his wife, Kristina Anderson, and was seen hugging Portwood. A 'Teen Mom' producer was also with Amber.
Amber Portwood went after her boyfriend with a machete ... he wasn't the worse for wear, but their door sure was.
It was like a scene right out of "The Shining" ... Amber and Andrew Glennon got in a heated argument that escalated big time, and according to court documents, she wielded the machete and struck a door with Glennon on the other side.
The machete didn't hit him but Amber allegedly found another way to inflict injury ... by striking him with a shoe while he was holding their one-year-old son, James.
Amber was arrested on 3 felony charges, including domestic battery and criminal recklessness with a deadly weapon, and a judge just slapped her with a restraining order. She can't go near Glennon or their son until the criminal case is resolved.
We broke the story ... Portwood was arrested last week in Indianapolis after Glennon contacted police claiming his and James' lives were in danger.
Glennon claims she also assaulted him with a shoe while he was holding James, and cops noticed marks on his neck when they arrived. He told officers this was not the first time she had struck him. Police contacted Children's Services.
Glennon has filed for an emergency hearing to obtain sole custody of their son too.