- Add 'cast' import to fix mypy type compatibility error
- Remove unused imports to fix lint warnings
- Add assertions to reproduction script to use agent variables
- All custom tool patterns now work correctly
Co-Authored-By: João <joao@crewai.com>
- Update validate_tools method in BaseAgent to accept all documented tool patterns:
* Function tools (with or without @tool decorator)
* Dict-based tool definitions
* BaseTool class inheritance
* Direct function assignment
- Change tools field type annotation from List[BaseTool] to List[Any] to allow Pydantic validation
- Update parse_tools function to accept all BaseTool instances (not just CrewAITool)
- Add comprehensive tests covering all custom tool patterns from issue #3226
- Add reproduction script to verify all patterns work correctly
Fixes#3226
Co-Authored-By: João <joao@crewai.com>