get_events_info
Retrieve an overview of on-chain indicator alert subscriptions including pricing, supported conditions, subscriber flow, registry addresses per chain, and subscription stats.
Instructions
Get overview of Pythia Events — on-chain indicator alert subscriptions.
Returns pricing, supported conditions, subscriber flow, registry addresses per chain, and current subscription stats. Events let you subscribe once and get notified when an indicator crosses a threshold.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| result | Yes |
Implementation Reference
- src/pythia_oracle_mcp/server.py:633-684 (handler)The get_events_info tool is defined as an async function decorated with @mcp.tool() on line 633. It fetches live data, extracts the 'events' section, and returns a formatted text overview of Pythia Events — on-chain indicator alert subscriptions (pricing, conditions, registry addresses, stats, etc.).
@mcp.tool() async def get_events_info() -> str: """Get overview of Pythia Events — on-chain indicator alert subscriptions. Returns pricing, supported conditions, subscriber flow, registry addresses per chain, and current subscription stats. Events let you subscribe once and get notified when an indicator crosses a threshold. """ data = await _fetch_data() events = data.get("events", {}) if data else {} if not events: return ("Pythia Events info not available. " "Visit https://pythia.c3x-solutions.com for details.") lines = ["Pythia Events — On-Chain Indicator Alerts\n"] lines.append("Subscribe once, get notified when your condition is met.") lines.append("One-shot: fires once, remaining whole days refunded in LINK.\n") lines.append(f"Pricing: {events.get('pricing', '?')}") lines.append(f"Max duration: {events.get('max_days', 365)} days") lines.append(f"Threshold scale: {events.get('threshold_scale', '?')}") lines.append(f"Refund policy: {events.get('refund', '?')}\n") conditions = events.get("conditions", {}) active = conditions.get("active", []) future = conditions.get("future", []) lines.append("Conditions:") for c in active: lines.append(f" {c} [active]") for c in future: lines.append(f" {c} [future — accepted, not yet processed]") lines.append("") lines.append("Subscriber Flow:") for i, step in enumerate(events.get("subscriber_flow", []), 1): lines.append(f" {i}. {step}") lines.append("") registries = events.get("registries", []) if registries: lines.append("Event Registry Contracts:") for reg in registries: lines.append(f" {reg['chain']}: {reg['address']}") lines.append("") stats = events.get("stats", {}) active_subs = stats.get("active_subscriptions", 0) total_subs = stats.get("total_subscriptions", 0) lines.append(f"Stats: {active_subs} active / {total_subs} total subscriptions") lines.append("\nUse get_events_guide() for Solidity integration code.") lines.append("Use subscribe_info() to plan a specific subscription.") return "\n".join(lines) - src/pythia_oracle_mcp/server.py:633-634 (registration)The tool is registered via the @mcp.tool() decorator (line 633) on the FastMCP instance named 'mcp', defined on line 17. This is the registration mechanism.
@mcp.tool() async def get_events_info() -> str: