Your lightweight open-source personal agent.
Python agent-frameworkai-agentai-agentschatbotchatopsdiscord-botllm-agentsllmslocal-llmmcpmodel-context-protocolmulti-agentopenai-compatibleopenclawpersonal-ai-assistantpythonself-hostedtelegram-bot-ai-assistantwebuiworkflow-automation
fix: add guard for non-dict tool call parameters
ramonpaolo830644c35292
diff --git a/nanobot/agent/tools/registry.py b/nanobot/agent/tools/registry.pyindex 99d3ec63a..137038c0c 100644--- a/nanobot/agent/tools/registry.py+++ b/nanobot/agent/tools/registry.py@@ -68,6 +68,13 @@ class ToolRegistry:params: dict[str, Any],) -> tuple[Tool | None, dict[str, Any], str | None]:"""Resolve, cast, and validate one tool call."""+ # Guard against invalid parameter types (e.g., list instead of dict)+ if not isinstance(params, dict) and name in ('write_file', 'read_file'):+ return None, params, (+ f"Error: Tool '{name}' parameters must be a JSON object, got {type(params).__name__}. "+ "Use named parameters: tool_name(param1=\"value1\", param2=\"value2\")"+ )+tool = self._tools.get(name)if not tool:return None, params, (