mirror of
https://github.com/eigent-ai/eigent.git
synced 2026-05-05 07:10:19 +00:00
initial commit
This commit is contained in:
commit
f6dd426830
1145 changed files with 102834 additions and 0 deletions
18
backend/app/controller/tool_controller.py
Normal file
18
backend/app/controller/tool_controller.py
Normal file
|
|
@ -0,0 +1,18 @@
|
|||
from fastapi import APIRouter
|
||||
|
||||
from app.utils.toolkit.notion_mcp_toolkit import NotionMCPToolkit
|
||||
|
||||
|
||||
router = APIRouter(tags=["task"])
|
||||
|
||||
|
||||
@router.post("/install/tool/{tool}", name="install tool")
|
||||
async def install_tool(tool: str):
|
||||
if tool == "notion":
|
||||
toolkit = NotionMCPToolkit(tool)
|
||||
await toolkit.connect()
|
||||
else:
|
||||
return {"error": "Tool not found"}
|
||||
tools = [tool.func.__name__ for tool in toolkit.get_tools()]
|
||||
await toolkit.disconnect()
|
||||
return tools
|
||||
Loading…
Add table
Add a link
Reference in a new issue