Files
crewAI/lib/crewai/tests
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-04 00:45:09 -05:00
2025-10-20 14:10:19 -07:00
2025-12-04 16:53:19 -05:00
2026-02-13 21:34:37 -03:00
2025-10-20 14:10:19 -07:00
2026-03-24 19:03:35 +08:00
2026-02-13 21:34:37 -03:00
2025-12-04 13:34:29 -08:00
2025-10-20 14:10:19 -07:00
2025-12-01 18:56:56 -05:00
2025-10-20 14:10:19 -07:00
2025-10-20 14:10:19 -07:00
2025-10-20 14:10:19 -07:00