MCPcopy
hub / github.com/AstrBotDevs/AstrBot / test_mcp_server

Function test_mcp_server

astrbot/dashboard/api/tools.py:284–291  ·  view source on GitHub ↗
(
    server_name: str,
    payload: McpServerRequest | None = None,
    _auth: AuthContext = Depends(require_mcp_scope),
    service: ToolsService = Depends(get_service),
)

Source from the content-addressed store, hash-verified

282
283@router.post("/mcp/servers/{server_name:path}/test")
284async def test_mcp_server(
285 server_name: str,
286 payload: McpServerRequest | None = None,
287 _auth: AuthContext = Depends(require_mcp_scope),
288 service: ToolsService = Depends(get_service),
289):
290 body = _model_dict(payload) if payload is not None else {}
291 return await _test_mcp_server(server_name, body, service)
292
293
294@router.put("/mcp/servers/{server_name:path}")

Callers

nothing calls this directly

Calls 2

_test_mcp_serverFunction · 0.85
_model_dictFunction · 0.70

Tested by

no test coverage detected