mirror of
https://github.com/believethehype/nostrdvm.git
synced 2025-09-26 02:07:16 +02:00
Update mcpbridge.py
This commit is contained in:
@@ -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)
|
||||
|
Reference in New Issue
Block a user