Update mcpbridge.py

This commit is contained in:
dbth
2025-02-09 21:12:43 +01:00
parent 97612ac8d2
commit 3a622ea7af

View File

@@ -104,8 +104,10 @@ class MCPBridge(DVMTaskInterface):
elif options["command"] == "execute-tool":
print(options["payload"])
tool_name = "get-crypto-price"
tool_args = {"symbol": "BTC"}
ob = json.loads(options["payload"])
tool_name = ob["name"]
tool_args = ob["parameters"]
tool_response = await self.call_tool(config_path, server_names, tool_name, tool_args)
return json.dumps(tool_response)
@@ -189,15 +191,6 @@ class MCPBridge(DVMTaskInterface):
return "not_found"
alltools = []
for server_name in server_names:
server_params = await config.load_config(config_path, server_name)