mirror of https://github.com/langgenius/dify.git
Update api/core/tools/mcp_tool/tool.py
Co-authored-by: gemini-code-assist[bot] <176961590+gemini-code-assist[bot]@users.noreply.github.com>
This commit is contained in:
parent
a87c7b0064
commit
71cd681c91
|
|
@ -51,9 +51,10 @@ class MCPTool(Tool):
|
|||
) -> Generator[ToolInvokeMessage, None, None]:
|
||||
# If inputs is provided, flatten its key/value pairs into the tool_parameters.
|
||||
# This is a conservative merge: only add a key from inputs if it does not already exist in tool_parameters.
|
||||
for key, value in inputs.items():
|
||||
if key not in tool_parameters:
|
||||
tool_parameters[key] = value
|
||||
if inputs:
|
||||
for key, value in inputs.items():
|
||||
if key not in tool_parameters:
|
||||
tool_parameters[key] = value
|
||||
result = self.invoke_remote_mcp_tool(tool_parameters)
|
||||
# handle dify tool output
|
||||
for content in result.content:
|
||||
|
|
|
|||
Loading…
Reference in New Issue