Skip to main content
Glama
0xsl1m

cerebrus-pulse-mcp

cerebrus_stress

Measures market stress using cross-chain arbitrage detection across 8 chains. Returns stress level (LOW to EXTREME), score, and spread statistics.

Instructions

Get market stress index derived from cross-chain arbitrage detection. Scans 8 chains (Arbitrum, Base, Optimism, Polygon, etc.) for price dislocations. Returns stress level (LOW/MODERATE/HIGH/EXTREME), score (0-1), spread statistics, chain routes, and recent scan summaries. Unique signal — not available from any other provider. Cost: $0.015 USDC via x402.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
limitNoNumber of recent scans to analyze (1-50). Default: 10

Implementation Reference

  • Tool definition/registration for 'cerebrus_stress' — declares name, description, and inputSchema (with optional 'limit' param). Registered via the list of Tool objects returned by @server.list_tools().
    Tool(
        name="cerebrus_stress",
        description=(
            "Get market stress index derived from cross-chain arbitrage detection. "
            "Scans 8 chains (Arbitrum, Base, Optimism, Polygon, etc.) for price dislocations. "
            "Returns stress level (LOW/MODERATE/HIGH/EXTREME), score (0-1), "
            "spread statistics, chain routes, and recent scan summaries. "
            "Unique signal — not available from any other provider. Cost: $0.015 USDC via x402."
        ),
        inputSchema={
            "type": "object",
            "properties": {
                "limit": {
                    "type": "integer",
                    "description": "Number of recent scans to analyze (1-50). Default: 10",
                    "default": 10,
                    "minimum": 1,
                    "maximum": 50,
                },
            },
        },
    ),
  • Tool handler for 'cerebrus_stress' — extracts the optional 'limit' argument (default 10) and calls _api_get('/arb', params={'limit': limit}). The API path '/arb' corresponds to the cross-chain arbitrage detection endpoint.
    elif name == "cerebrus_stress":
        limit = arguments.get("limit", 10)
        result = _api_get("/arb", params={"limit": limit})
  • The _api_get helper function used by the tool handler to make GET requests to the Cerebrus Pulse API, handling 402 payment, 429 rate limit, and standard 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()
  • Input schema for 'cerebrus_stress' — defines a single optional integer parameter 'limit' (1-50, default 10) controlling the number of recent scans to analyze.
    inputSchema={
        "type": "object",
        "properties": {
            "limit": {
                "type": "integer",
                "description": "Number of recent scans to analyze (1-50). Default: 10",
                "default": 10,
                "minimum": 1,
                "maximum": 50,
            },
        },
    },
  • CLI registration entry for the stress tool — maps CLI name 'stress' to API path '/arb' with optional limit parameter (default 10).
    "stress":        ("/arb",              [("limit", False, int, 10)]),
    "cex-dex":       ("/cex-dex/{coin}",    [("coin", True, str, None)]),
Behavior3/5

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

No annotations provided; description adds cost ($0.015 USDC via x402) and mentions scanning 8 chains, but lacks details on rate limits, response format, or side effects beyond being a read operation.

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?

Three sentences, front-loaded with purpose and key outputs, no filler. Every sentence adds value.

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

Completeness4/5

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

Given one parameter with full schema and no output schema, the description lists return fields (stress level, score, spread, chain routes, summaries) adequately, though format details are omitted.

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

Parameters3/5

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

Parameter 'limit' is fully described in schema (1-50, default 10); description does not add meaning beyond schema, so baseline 3 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 'Get market stress index' and lists specific outputs (stress level, score, spread, etc.), distinguishing it from siblings by claiming 'Unique signal — not available from any other provider.'

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?

Mentions uniqueness, implying use when alternative stress indices are insufficient, but does not explicitly exclude use cases or compare with sibling tools like cerebrus_basis or cerebrus_sentiment.

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