Skip to content

Commit 601b03d

Browse files
committed
fix: ensure tool parameters are properly handled by reloading JSON
--bug=1053980 --user=刘瑞斌 【应用】MCP节点的工具参数引用参数时,对话过程中参数值发生变化,MCP节点没有获取最新的参数值 https://www.tapd.cn/57709429/s/1676830
1 parent 8252feb commit 601b03d

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

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

+2-1
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,8 @@ def save_context(self, details, workflow_manage):
1818

1919
def execute(self, mcp_servers, mcp_server, mcp_tool, tool_params, **kwargs) -> NodeResult:
2020
servers = json.loads(mcp_servers)
21-
params = self.handle_variables(tool_params)
21+
params = json.loads(json.dumps(tool_params))
22+
params = self.handle_variables(params)
2223

2324
async def call_tool(s, session, t, a):
2425
async with MultiServerMCPClient(s) as client:

0 commit comments

Comments
 (0)