Skip to main content
Glama
pythia-the-oracle

pythia-oracle-mcp

Official

check_oracle_health

Assess the reliability and uptime of Pythia's oracle system. Review per-token 30-day uptime, daily status, and infrastructure health to verify data quality.

Instructions

Check the reliability and uptime of Pythia's oracle system.

Returns per-token 30-day uptime (sorted worst-first so problems surface immediately), recent daily status history, data source health, and infrastructure status. Use this to verify Pythia's reliability before integrating or relying on its data.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
resultYes

Implementation Reference

  • The check_oracle_health() function — the actual handler that implements the tool logic. Fetches live data and returns a health report with per-token uptime, data source health, and infrastructure status.
    @mcp.tool()
    async def check_oracle_health() -> str:
        """Check the reliability and uptime of Pythia's oracle system.
    
        Returns per-token 30-day uptime (sorted worst-first so problems
        surface immediately), recent daily status history, data source
        health, and infrastructure status. Use this to verify Pythia's
        reliability before integrating or relying on its data.
        """
        data = await _fetch_data()
        tokens = data.get("tokens", [])
        system = data.get("system", {})
        stats = data.get("stats", {})
        generated = data.get("generated_at", "unknown")
    
        lines = [f"Pythia Oracle — Health Report (as of {generated})\n"]
    
        # System-level
        incidents = stats.get("active_incidents", 0)
        if incidents > 0:
            lines.append(f"  *** {incidents} ACTIVE INCIDENT(S) ***\n")
        else:
            lines.append("  No active incidents.\n")
    
        # Infrastructure
        infra = system.get("infrastructure", {})
        all_ok = all(v == "ok" for v in infra.values())
        lines.append(f"Infrastructure: {'ALL OK' if all_ok else 'ISSUES DETECTED'}")
        if not all_ok:
            for component, status in infra.items():
                if status != "ok":
                    lines.append(f"  {component}: {status}")
        lines.append("")
    
        # Data sources
        sources = system.get("sources", [])
        sources_ok = all(s["status"] == "ok" for s in sources)
        lines.append(f"Data Sources: {'ALL OK' if sources_ok else 'ISSUES DETECTED'}")
        for s in sources:
            marker = " " if s["status"] == "ok" else "!"
            lines.append(f" {marker} {s['name']:<15} {s['status']}")
        lines.append("")
    
        # Per-token uptime, worst first
        lines.append(f"{'Token':<8} {'Uptime 30d':>10}  {'Status':<6}  {'Src':>3}  Last 7 days")
        lines.append("-" * 65)
    
        sorted_tokens = sorted(tokens, key=lambda t: t.get("uptime_30d", 0))
        for t in sorted_tokens:
            uptime = t.get("uptime_30d")
            uptime_str = f"{uptime:.1f}%" if uptime is not None else "?"
            status = t.get("status", "?")
    
            # Last 7 days from uptime_days (most recent last)
            days = t.get("uptime_days", [])
            last_7 = days[-7:] if len(days) >= 7 else days
            day_str = " ".join("." if d == "ok" else "W" if d == "warn" else "X" for d in last_7)
    
            flag = " " if (uptime is not None and uptime >= 99.0) else "*"
            lines.append(
                f"{flag}{t['symbol']:<7} {uptime_str:>10}  {status:<6}  "
                f"{t.get('sources', '?'):>3}  {day_str}"
            )
    
        lines.append("")
        lines.append("Legend: . = ok, W = warming up, X = down")
        lines.append("* = below 99% uptime (investigate)")
        return "\n".join(lines)
  • Registration uses the @mcp.tool() decorator on line 325, which registers check_oracle_health as a tool with the FastMCP server instance.
    @mcp.tool()
    async def check_oracle_health() -> str:
        """Check the reliability and uptime of Pythia's oracle system.
    
        Returns per-token 30-day uptime (sorted worst-first so problems
        surface immediately), recent daily status history, data source
        health, and infrastructure status. Use this to verify Pythia's
        reliability before integrating or relying on its data.
        """
        data = await _fetch_data()
        tokens = data.get("tokens", [])
        system = data.get("system", {})
        stats = data.get("stats", {})
        generated = data.get("generated_at", "unknown")
    
        lines = [f"Pythia Oracle — Health Report (as of {generated})\n"]
    
        # System-level
        incidents = stats.get("active_incidents", 0)
        if incidents > 0:
            lines.append(f"  *** {incidents} ACTIVE INCIDENT(S) ***\n")
        else:
            lines.append("  No active incidents.\n")
    
        # Infrastructure
        infra = system.get("infrastructure", {})
        all_ok = all(v == "ok" for v in infra.values())
        lines.append(f"Infrastructure: {'ALL OK' if all_ok else 'ISSUES DETECTED'}")
        if not all_ok:
            for component, status in infra.items():
                if status != "ok":
                    lines.append(f"  {component}: {status}")
        lines.append("")
    
        # Data sources
        sources = system.get("sources", [])
        sources_ok = all(s["status"] == "ok" for s in sources)
        lines.append(f"Data Sources: {'ALL OK' if sources_ok else 'ISSUES DETECTED'}")
        for s in sources:
            marker = " " if s["status"] == "ok" else "!"
            lines.append(f" {marker} {s['name']:<15} {s['status']}")
        lines.append("")
    
        # Per-token uptime, worst first
        lines.append(f"{'Token':<8} {'Uptime 30d':>10}  {'Status':<6}  {'Src':>3}  Last 7 days")
        lines.append("-" * 65)
    
        sorted_tokens = sorted(tokens, key=lambda t: t.get("uptime_30d", 0))
        for t in sorted_tokens:
            uptime = t.get("uptime_30d")
            uptime_str = f"{uptime:.1f}%" if uptime is not None else "?"
            status = t.get("status", "?")
    
            # Last 7 days from uptime_days (most recent last)
            days = t.get("uptime_days", [])
            last_7 = days[-7:] if len(days) >= 7 else days
            day_str = " ".join("." if d == "ok" else "W" if d == "warn" else "X" for d in last_7)
    
            flag = " " if (uptime is not None and uptime >= 99.0) else "*"
            lines.append(
                f"{flag}{t['symbol']:<7} {uptime_str:>10}  {status:<6}  "
                f"{t.get('sources', '?'):>3}  {day_str}"
            )
    
        lines.append("")
        lines.append("Legend: . = ok, W = warming up, X = down")
        lines.append("* = below 99% uptime (investigate)")
        return "\n".join(lines)
Behavior4/5

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

Describes return data including per-token uptime sorted worst-first, daily history, data source health, and infrastructure status. No annotations provided, so description carries full burden; it adequately discloses the read-only nature and output format.

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 concise sentences: first states purpose, second lists outputs with sorting detail, third gives usage guidance. No wasted words.

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 no parameters, no annotations, and presence of an output schema, the description provides sufficient context about what the tool returns and when to use it. Minor improvement could be explicit note about zero side effects.

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, and schema coverage is 100%. Description adds no parameter info, which is acceptable as there are none. Baseline for zero parameters is 4.

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?

Description clearly states the action: 'Check the reliability and uptime of Pythia's oracle system.' It specifies the resource (oracle system) and what it returns, distinguishing it from sibling tools like get_market_summary or get_pricing.

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?

Explicitly states when to use: 'Use this to verify Pythia's reliability before integrating or relying on its data.' No exclusions or alternatives are mentioned, but given it is a unique health check tool, this is clear.

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/pythia-the-oracle/pythia-oracle-mcp'

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