Required prerequisites
What version of camel are you using?
0.2.71a10
System information
>>> import sys, camel
>>> print(sys.version, sys.platform)
3.11.8 (main, Jan 14 2025, 13:47:38) [Clang 15.0.0 (clang-1500.3.9.4)] darwin
>>> print(camel.__version__)
0.2.71a10
Problem description
When using VideoAnalysisToolkit together with VideoDownloaderToolkit and MCPServer integration, a runtime error occurs during tool registration. The stack trace shows that Pydantic fails to generate a schema for PIL.Image.Image return types (e.g., get_video_screenshots), resulting in a PydanticSchemaGenerationError. This is triggered because MCPServer attempts to parse and wrap functions with output annotations involving PIL.Image.Image, which is not natively supported by Pydantic schema generation.
The error is reproducible when MCPServer decorates toolkits that expose methods returning PIL.Image.Image or its list variants.
Reproducible example code
related camel-ai/owl#563
Traceback
Expected behavior
No response
Additional context
No response
Required prerequisites
What version of camel are you using?
0.2.71a10
System information
Problem description
When using
VideoAnalysisToolkittogether withVideoDownloaderToolkitand MCPServer integration, a runtime error occurs during tool registration. The stack trace shows that Pydantic fails to generate a schema forPIL.Image.Imagereturn types (e.g.,get_video_screenshots), resulting in aPydanticSchemaGenerationError. This is triggered because MCPServer attempts to parse and wrap functions with output annotations involvingPIL.Image.Image, which is not natively supported by Pydantic schema generation.The error is reproducible when MCPServer decorates toolkits that expose methods returning
PIL.Image.Imageor its list variants.Reproducible example code
related camel-ai/owl#563
Traceback
Expected behavior
No response
Additional context
No response