Improve MCP tool handling and OpenAI integration
Refactors MCP tool listing and invocation for better type safety and normalization. Enhances OpenAI chat completion streaming with stricter typing, improved multimodal support, and more robust tool call aggregation. Cleans up type definitions and utility functions for message updates. Fixes minor bugs and improves code clarity throughout MCP and text generation modules.