Skip to content

Framework for orchestrating role-playing, autonomous AI agents. By fostering collaborative intelligence, CrewAI empowers agents to work together seamlessly, tackling complex tasks.

Fix bool and null handling (#1771)

Karan Vaidya94eaa6740e95
diff --git a/src/crewai/tools/tool_usage.py b/src/crewai/tools/tool_usage.py
index 15227542d..3de4a8fab 100644
--- a/src/crewai/tools/tool_usage.py
+++ b/src/crewai/tools/tool_usage.py
@@ -419,9 +419,10 @@ class ToolUsage:
elif value.lower() in [
"true",
"false",
- "null",
]: # Check for boolean and null values
- value = value.lower()
+ value = value.lower().capitalize()
+ elif value.lower() == "null":
+ value = "None"
else:
# Assume the value is a string and needs quotes
value = '"' + value.replace('"', '\\"') + '"'