From 8a3130ee6f84d267b84dd9edd73cac7c04417bf8 Mon Sep 17 00:00:00 2001 From: goulustis Date: Tue, 14 Oct 2025 20:50:33 +0800 Subject: [PATCH] auto get toolconfig --- lang_agent/mcp_server.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lang_agent/mcp_server.py b/lang_agent/mcp_server.py index 49b848a..1b9b4a6 100644 --- a/lang_agent/mcp_server.py +++ b/lang_agent/mcp_server.py @@ -55,7 +55,7 @@ class MCPServer: tool_confs = [] for e in dir(self.config): el = getattr(self.config, e) - if ("config" in e) and is_dataclass(el): + if ("calc_config" in e) and is_dataclass(el): tool_confs.append(el) return tool_confs @@ -63,7 +63,7 @@ class MCPServer: def register_mcp_functions(self): # NOTE: add config here for new tools; too stupid to do this automatically - tool_configs = [self.config.rag_config, self.config.cart_config] + tool_configs = self._get_tool_config() for tool_conf in tool_configs: if tool_conf.use_tool: logger.info(f"using tool:{tool_conf._target}")