1. Check API key status and prompt user if missing.
2. If editing or using a reference image, upload the file using the file API.
3. Understand the user's intent: new image, edit, or reference.
4. Gather necessary parameters: prompt, model, size, number of images, etc.
5. Call the `generate_image` MCP tool with the collected parameters.
6. Poll the `check_task` MCP tool until the task is completed or failed.
7. Report the results to the user, providing image URLs or error messages.