Files
crewAI/lib/crewai/src/crewai
Devin AI c3faffd868 fix: initialize tools_list and log warning in _resolve_native when no tools found
Fixes #5116. MCPToolResolver._resolve_native() could raise UnboundLocalError
when asyncio.run() raised a RuntimeError that didn't match the 'cancel scope'
or 'task' conditions — the exception was silently swallowed leaving tools_list
unbound.

Changes:
- Initialize tools_list to an empty list before the try block
- Add early return with warning log when tools_list is empty (matching
  the existing behavior in _resolve_external)

This covers three scenarios:
1. MCP server returns no tools
2. tool_filter removes all tools
3. RuntimeError swallowed without assigning tools_list

Co-Authored-By: João <joao@crewai.com>
2026-03-26 18:32:06 +00:00
..
2026-03-15 23:30:29 -04:00
2026-03-26 03:33:10 -03:00
2025-10-20 14:10:19 -07:00
2026-03-24 19:03:35 +08:00
2026-03-24 19:03:35 +08:00
2025-10-21 17:36:08 -04:00
2025-10-20 14:10:19 -07:00
2025-10-20 14:10:19 -07:00