first commit
This commit is contained in:
@@ -0,0 +1,5 @@
|
||||
from .manager import ToolManager
|
||||
from .mcp_adapter import MCPAdapter
|
||||
|
||||
|
||||
__all__ = ["ToolManager", "MCPAdapter"]
|
||||
@@ -0,0 +1,11 @@
|
||||
class ToolManager:
|
||||
def __init__(self):
|
||||
self.tools = {}
|
||||
|
||||
def register_tool(self, name, tool_func):
|
||||
self.tools[name] = tool_func
|
||||
|
||||
def execute_tool(self, name, **kwargs):
|
||||
if name not in self.tools:
|
||||
raise ValueError(f"Tool {name} not found")
|
||||
return self.tools[name](**kwargs)
|
||||
@@ -0,0 +1,9 @@
|
||||
class MCPAdapter:
|
||||
def __init__(self, config):
|
||||
self.config = config
|
||||
|
||||
def connect(self):
|
||||
pass
|
||||
|
||||
def call_tool(self, tool_name, params):
|
||||
pass
|
||||
Reference in New Issue
Block a user