mirror of
https://github.com/believethehype/nostrdvm.git
synced 2025-09-27 21:47:10 +02:00
Update mcpbridge.py
This commit is contained in:
@@ -104,8 +104,10 @@ class MCPBridge(DVMTaskInterface):
|
|||||||
elif options["command"] == "execute-tool":
|
elif options["command"] == "execute-tool":
|
||||||
|
|
||||||
print(options["payload"])
|
print(options["payload"])
|
||||||
tool_name = "get-crypto-price"
|
ob = json.loads(options["payload"])
|
||||||
tool_args = {"symbol": "BTC"}
|
|
||||||
|
tool_name = ob["name"]
|
||||||
|
tool_args = ob["parameters"]
|
||||||
tool_response = await self.call_tool(config_path, server_names, tool_name, tool_args)
|
tool_response = await self.call_tool(config_path, server_names, tool_name, tool_args)
|
||||||
|
|
||||||
return json.dumps(tool_response)
|
return json.dumps(tool_response)
|
||||||
@@ -189,15 +191,6 @@ class MCPBridge(DVMTaskInterface):
|
|||||||
return "not_found"
|
return "not_found"
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
alltools = []
|
alltools = []
|
||||||
for server_name in server_names:
|
for server_name in server_names:
|
||||||
server_params = await config.load_config(config_path, server_name)
|
server_params = await config.load_config(config_path, server_name)
|
||||||
|
Reference in New Issue
Block a user