Spaces:
Paused
Paused
Download python/api/mcp_server_get_detail.py from OnyxMunk/GravityFalls: direct link, hf CLI and curl.
- Browser
- Download file 676 Bytes
-
https://huggingface.co/spaces/OnyxMunk/GravityFalls/resolve/main/python/api/mcp_server_get_detail.py
- Command line
-
hf download hf://spaces/OnyxMunk/GravityFalls/python/api/mcp_server_get_detail.py
-
curl -L -o mcp_server_get_detail.py https://huggingface.co/spaces/OnyxMunk/GravityFalls/resolve/main/python/api/mcp_server_get_detail.py
676 Bytes
| from python.helpers.api import ApiHandler, 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)} | |