get_pricing
Retrieve live pricing tiers and free trial information from the Pythia data feed to evaluate subscription costs.
Instructions
Get Pythia pricing tiers and free trial info. Prices are live from the data feed.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| result | Yes |
Implementation Reference
- src/pythia_oracle_mcp/server.py:443-478 (handler)The main handler/implementation of the 'get_pricing' tool. It fetches live pricing data from feed-status.json, extracts tier fees (discovery, analysis, speed, complete), and returns a formatted string with tier pricing and free trial info.
@mcp.tool() async def get_pricing() -> str: """Get Pythia pricing tiers and free trial info. Prices are live from the data feed.""" data = await _fetch_data() fees = _get_tier_fees(data) d = fees.get("discovery", "?") a = fees.get("analysis", "?") s = fees.get("speed", "?") c = fees.get("complete", "?") return f"""Pythia Oracle — Pricing Tiers DISCOVERY — {d} LINK Any single indicator (EMA, RSI, Bollinger, Volatility) Returns: uint256 Best for: one-off queries, specific signals ANALYSIS — {a} LINK All 1-hour, 1-day, and 1-week indicators bundled Returns: uint256[] Best for: protocols needing multi-timeframe view SPEED — {s} LINK All 5-minute indicators bundled Returns: uint256[] Best for: real-time trading, active rebalancing COMPLETE — {c} LINK Every indicator for a token (all timeframes) Returns: uint256[] Best for: comprehensive analysis FREE TRIAL — PythiaFaucet Address: {FAUCET_ADDRESS} No LINK needed. 5 requests/day/address. Real data.""" - Helper function _get_tier_fees() used by get_pricing to extract tier fees from the live feed-status.json data.
def _get_tier_fees(data: dict) -> dict[str, float]: """Extract tier fees from live feed-status.json data. Raises RuntimeError if tiers section is missing. """ tiers = data.get("tiers") if not tiers: raise RuntimeError( "feed-status.json is missing the tiers section. " "This is a structural error in the live data — check the data engine." ) return {t["id"]: t["fee"] for t in tiers if "id" in t and "fee" in t} - src/pythia_oracle_mcp/server.py:443-444 (registration)Registration of the 'get_pricing' tool via the @mcp.tool() decorator on the get_pricing function.
@mcp.tool() async def get_pricing() -> str: - Schema/type definition: the tool takes no arguments and returns a string.
async def get_pricing() -> str: