mirror of
https://github.com/agent0ai/agent-zero.git
synced 2026-04-29 12:10:57 +00:00
mcp polishing
This commit is contained in:
parent
c0ac75c6c1
commit
08f69c1012
8 changed files with 321 additions and 67 deletions
20
python/api/mcp_server_get_detail.py
Normal file
20
python/api/mcp_server_get_detail.py
Normal file
|
|
@ -0,0 +1,20 @@
|
|||
from math import log
|
||||
from python.helpers.api import ApiHandler
|
||||
from flask import Request, Response
|
||||
|
||||
from typing import Any
|
||||
|
||||
from python.helpers.mcp_handler import MCPConfig
|
||||
|
||||
|
||||
class McpServerGetDetail(ApiHandler):
|
||||
async def process(self, input: dict[Any, Any], request: Request) -> dict[Any, Any] | Response:
|
||||
|
||||
# try:
|
||||
server_name = input.get("server_name")
|
||||
if not server_name:
|
||||
return {"success": False, "error": "Missing server_name"}
|
||||
detail = MCPConfig.get_instance().get_server_detail(server_name)
|
||||
return {"success": True, "detail": detail}
|
||||
# except Exception as e:
|
||||
# return {"success": False, "error": str(e)}
|
||||
Loading…
Add table
Add a link
Reference in a new issue