String the beans- Remove the tough fibers that run along the edges of the bean by grasping the string firmly between your thumb and index finger, near the end where it's visible. Gently pull the string towards the tapered end of the bean, applying slight pressure as you go. The string should come away easily, leaving a clean and string-free bean. Repeat the process. Prepare the flat green beans by rinsing them thoroughly and trimming off the ends. Cut them in half or into bite-sized pieces.
Put the trimmed flat green beans in a pot and cover with water completely. Season with salt and bring to a boil. Reduce the heat to a simmer and cook until the beans can be easily pierced with a fork. Drain the water and set aside.
In the same pan you used for boiling the green beans, heat the olive oil over medium heat. Add the chopped onion and sauté until it become translucent and soft. Add minced garlic and cook for another 2 minutes, stirring occasionally to prevent it from burning.
Add the diced tomatoes to the pot and cook for a few minutes until they start to break down and release their juices.
Add the flat green beans to the pot and stir everything together. Season with salt and pepper. Reduce the heat to low, cover the pot, and let the beans cook for about 5-7 minutes. You want them to be tender yet retain a slight crispness. Stir occasionally to prevent sticking.
While the beans are cooking, prepare the eggs. In a separate bowl, whisk the eggs with a pinch of salt and pepper until well beaten. Chop parsley and set aside.
Pour the beaten eggs into the pot and gently stir the eggs into the bean mixture, breaking them up into smaller pieces as you go. Continue cooking for another 2-3 minutes until the eggs starting to set. Cover with a lid and remove from the heat. Let the eggs fully set, about 3-5 more minutes until they are fully cooked.Remove the pot from the heat and stir in the chopped parsley. Taste the dish and adjust the seasoning with salt and pepper if needed. Serve the flat green beans with onion, tomatoes, garlic, parsley, and egg hot as a side dish or as a light main course. It pairs well with crusty bread or rice.