MageBench: Bridging Large Multimodal Models to Agents