ping
Check server and backend health status for the ComfyMCP Studio AI game asset generation tool.
Instructions
Check if the MCP server and backend are healthy.
Returns:
Status message indicating server and backend health
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||
Implementation Reference
- server/main.py:77-96 (handler)The 'ping' tool handler: an async function decorated with @mcp.tool() that performs a health check on the backend and returns a JSON status object indicating server health, backend name, type, health status, and timestamp.@mcp.tool() async def ping() -> str: """Check if the MCP server and backend are healthy. Returns: Status message indicating server and backend health """ try: backend_healthy = await asyncio.wait_for(backend.health_check(), timeout=5.0) except asyncio.TimeoutError: backend_healthy = False except Exception: backend_healthy = False return json.dumps({ "status": "ok", "backend": backend.get_name(), "backend_type": BACKEND_TYPE, "backend_healthy": backend_healthy, "timestamp": datetime.now().isoformat() }, indent=2)
- server/main.py:77-77 (registration)The @mcp.tool() decorator registers the 'ping' function as an MCP tool.@mcp.tool()