Files
crewAI/lib
Devin AI 49165570b7 fix: validate tool kwargs even when empty to prevent cryptic TypeError (#4611)
When BaseTool.run() was called with no keyword arguments (empty dict),
_validate_kwargs skipped validation because 'if kwargs' is False for {}.
This meant required schema fields like 'queries' in RecallMemoryTool were
never checked, causing a confusing TypeError:
  '_run() missing 1 required positional argument: queries'

Fix: Remove the 'kwargs' truthiness check so validation always runs when
an args_schema with fields is present. Skip validation only when positional
args are provided (backwards compat for tool.run('value') style calls).

Also adds dedicated test coverage for RecallMemoryTool and RememberTool.

Co-Authored-By: João <joao@crewai.com>
2026-02-26 18:51:13 +00:00
..