Agent Zero AI framework
fix: validate_tool_request rejects empty tool_args dict (PATCH-015)
Greg DeYoung7cf8905af50f
diff --git a/agent.py b/agent.pyindex db7626b0e..e7a73e858 100644--- a/agent.py+++ b/agent.py@@ -978,7 +978,7 @@ class Agent:raise ValueError("Tool request must be a dictionary")if not tool_request.get("tool_name") or not isinstance(tool_request.get("tool_name"), str):raise ValueError("Tool request must have a tool_name (type string) field")- if not tool_request.get("tool_args") or not isinstance(tool_request.get("tool_args"), dict):+ if "tool_args" not in tool_request or not isinstance(tool_request.get("tool_args"), dict):raise ValueError("Tool request must have a tool_args (type dictionary) field")