check_karma
Verify connectivity to the Karma Alert dashboard for monitoring Kubernetes alerts. This tool confirms the server connection is active before accessing alert data.
Instructions
Check connection to Karma server
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||
Implementation Reference
- src/karma_mcp/server.py:305-317 (handler)Implementation of the `check_karma` MCP tool, which performs an HTTP GET request to the Karma health endpoint to verify the server status.
@mcp.tool() async def check_karma() -> str: """Check connection to Karma server""" try: async with httpx.AsyncClient() as client: response = await client.get(f"{KARMA_URL}/health") if response.status_code == 200: return f"✓ Karma is running at {KARMA_URL}" else: return f"⚠ Karma responded with code {response.status_code}" except Exception as e: return f"✗ Error connecting to Karma: {str(e)}"