mirror of
https://github.com/1Panel-dev/MaxKB.git
synced 2025-12-26 01:33:05 +00:00
chore: add check for inactive tools in base_mcp_node.py
This commit is contained in:
parent
d21518e7b7
commit
fcd6b53bfc
|
|
@ -24,6 +24,8 @@ class BaseMcpNode(IMcpNode):
|
|||
tool = QuerySet(Tool).filter(id=mcp_tool_id).first()
|
||||
if not tool:
|
||||
raise ValueError(f"Tool with ID {mcp_tool_id} not found.")
|
||||
if not tool.is_active:
|
||||
raise ValueError(f"Tool with ID {mcp_tool_id} is inactive.")
|
||||
servers = json.loads(tool.code)
|
||||
params = json.loads(json.dumps(tool_params))
|
||||
params = self.handle_variables(params)
|
||||
|
|
|
|||
Loading…
Reference in New Issue