Skip to content

Commit fcd6b53

Browse files
committed
chore: add check for inactive tools in base_mcp_node.py
1 parent d21518e commit fcd6b53

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

apps/application/flow/step_node/mcp_node/impl/base_mcp_node.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,8 @@ def execute(self, mcp_servers, mcp_server, mcp_tool, mcp_tool_id, mcp_source, to
2424
tool = QuerySet(Tool).filter(id=mcp_tool_id).first()
2525
if not tool:
2626
raise ValueError(f"Tool with ID {mcp_tool_id} not found.")
27+
if not tool.is_active:
28+
raise ValueError(f"Tool with ID {mcp_tool_id} is inactive.")
2729
servers = json.loads(tool.code)
2830
params = json.loads(json.dumps(tool_params))
2931
params = self.handle_variables(params)

0 commit comments

Comments
 (0)