cerebrus_health
Check the health status of Cerebrus Pulse gateway. No payment required for use.
Instructions
Check Cerebrus Pulse gateway health status. FREE — no payment required.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||
Implementation Reference
- src/cerebrus_pulse_mcp/server.py:102-112 (registration)Tool 'cerebrus_health' is registered in the list_tools() function with the name 'cerebrus_health', description 'Check Cerebrus Pulse gateway health status. FREE — no payment required.', and an empty input schema.
Tool( name="cerebrus_health", description=( "Check Cerebrus Pulse gateway health status. " "FREE — no payment required." ), inputSchema={ "type": "object", "properties": {}, }, ), - src/cerebrus_pulse_mcp/server.py:375-376 (handler)The call_tool() handler for 'cerebrus_health' invokes _api_get('/health') to check the Cerebrus Pulse gateway health status.
elif name == "cerebrus_health": result = _api_get("/health") - The _api_get() helper function makes the actual GET request to the Cerebrus Pulse API. It handles 402 (payment required), 429 (rate limited), and other HTTP errors, returning JSON responses.
def _api_get(path: str, params: dict | None = None) -> dict[str, Any]: """Make a GET request to the Cerebrus Pulse API.""" with _make_client() as client: resp = client.get(path, params=params) if resp.status_code == 402: # Return payment details so the agent/user knows cost return { "status": "payment_required", "message": "This endpoint requires x402 USDC payment on Base or Solana.", "url": f"{BASE_URL}{path}", "payment_details": resp.headers.get("X-Payment", "See x402 SDK docs"), "help": "Install the x402 SDK and set CEREBRUS_WALLET_KEY (Base) or CEREBRUS_WALLET_KEY_SOLANA (Solana) to enable auto-payment. See https://cerebruspulse.xyz/guides/x402-payments", } if resp.status_code == 429: return { "status": "rate_limited", "message": "Rate limit exceeded. Back off and retry.", "detail": resp.json() if resp.headers.get("content-type", "").startswith("application/json") else resp.text, } resp.raise_for_status() return resp.json()