Skip to main content
Glama
0xsl1m

cerebrus-pulse-mcp

cerebrus_depeg

Check USDC collateral health via Chainlink oracle to detect depeg risk and determine peg status (healthy/elevated/warning/critical) along with Arbitrum sequencer status before sizing USDC-margined positions.

Instructions

Get USDC collateral health monitor via Chainlink oracle. Checks USDC/USD deviation from $1.00 peg, reports peg status (HEALTHY/ELEVATED/WARNING/CRITICAL), risk level, and Arbitrum sequencer status. Essential before sizing USDC-margined positions. Cost: $0.01 USDC via x402.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Implementation Reference

  • Tool 'cerebrus_depeg' is registered in the list_tools() function with its name, description, and empty inputSchema (no required params).
    Tool(
        name="cerebrus_depeg",
        description=(
            "Get USDC collateral health monitor via Chainlink oracle. "
            "Checks USDC/USD deviation from $1.00 peg, reports peg status "
            "(HEALTHY/ELEVATED/WARNING/CRITICAL), risk level, and Arbitrum "
            "sequencer status. Essential before sizing USDC-margined positions. "
            "Cost: $0.01 USDC via x402."
        ),
        inputSchema={
            "type": "object",
            "properties": {},
        },
    ),
  • Handler for 'cerebrus_depeg' tool: makes a GET request to the '/depeg' API endpoint with no parameters.
    elif name == "cerebrus_depeg":
        result = _api_get("/depeg")
  • Helper function _api_get() used to make the HTTP GET request to the Cerebrus Pulse API, which handles 402 (payment_required), 429 (rate_limited), and other HTTP errors.
    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()
  • Helper function _format_response() used to serialize the API response to JSON for the TextContent output.
    def _format_response(data: dict | list) -> str:
        return json.dumps(data, indent=2)
Behavior3/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

No annotations provided. Description mentions cost ($0.01 USDC) and output statuses (HEALTHY/ELEVATED/WARNING/CRITICAL, risk level, sequencer status). Missing details on failure modes or rate limits.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

Two concise sentences with all essential information front-loaded. No unnecessary words.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness5/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given no output schema or annotations, the description fully explains the tool's purpose, what it checks, and the cost. Sufficient for an agent to decide to invoke it.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters4/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Input schema has zero parameters, so no parameter info needed. Baseline of 4 for no parameters is appropriate.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states the tool retrieves USDC collateral health via Chainlink oracle, checking peg deviation and reporting multiple statuses. It is distinct from siblings like basis or funding tools.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines4/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

It indicates use 'before sizing USDC-margined positions,' providing clear context. No explicit exclusions or alternatives mentioned, but context is sufficient.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Install Server

Other Tools

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/0xsl1m/cerebrus-pulse-mcp'

If you have feedback or need assistance with the MCP directory API, please join our Discord server