Skip to main content
Glama
pythia-the-oracle

pythia-oracle-mcp

Official

get_feed_value

Obtain the current value of a Pythia indicator feed to sanity-check levels or inform event threshold decisions.

Instructions

Get the latest computed value of a Pythia indicator feed.

Reads from the live cache (feed_values table) populated by the indicator pipeline on every cycle. Off-chain AI agents use this when reasoning about a Vision context, choosing an Event threshold, or sanity-checking a feed's current level. On-chain consumers should request the value through oracle.request() to get a Chainlink-attested response — see get_integration_guide().

Args: feed_name: full feed name (e.g. 'bitcoin_RSI_1H_14', 'pol_EMA_5M_20').

Returns: Latest value + computed_at + chain, one block per chain if a feed exists on multiple chains. If the feed has no cached value, returns a diagnostic pointer (warm-up window, deactivated, or unknown name).

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
feed_nameYes

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
resultYes

Implementation Reference

  • The `get_feed_value` tool function: fetches the latest computed value of a Pythia indicator feed from the live cache (feed_values_current in feed-status.json). It looks up matching feed names and returns the value, chain, and computed_at timestamp per chain. If not found, returns a diagnostic message.
    @mcp.tool()
    async def get_feed_value(feed_name: str) -> str:
        """Get the latest computed value of a Pythia indicator feed.
    
        Reads from the live cache (feed_values table) populated by the indicator
        pipeline on every cycle. Off-chain AI agents use this when reasoning
        about a Vision context, choosing an Event threshold, or sanity-checking
        a feed's current level. On-chain consumers should request the value
        through oracle.request() to get a Chainlink-attested response — see
        get_integration_guide().
    
        Args:
            feed_name: full feed name (e.g. 'bitcoin_RSI_1H_14', 'pol_EMA_5M_20').
    
        Returns:
            Latest value + computed_at + chain, one block per chain if a feed
            exists on multiple chains. If the feed has no cached value, returns
            a diagnostic pointer (warm-up window, deactivated, or unknown name).
        """
        data = await _fetch_data()
        feeds = data.get("feed_values_current", []) if data else []
    
        matches = [f for f in feeds if f.get("feed_name") == feed_name]
        if not matches:
            return (
                f"Feed '{feed_name}' has no current value in the live cache.\n"
                "Possible reasons:\n"
                "  - Feed name not registered (use list_tokens() + "
                "get_token_feeds(engine_id) to discover)\n"
                "  - Feed inside its warm-up window (1H/1D/1W indicators on "
                "freshly-onboarded tokens)\n"
                "  - Pipeline degraded — check check_oracle_health()"
            )
    
        out = [f"Feed: {feed_name}"]
        for m in matches:
            out.append("")
            out.append(f"  Chain:       {m.get('chain')}")
            out.append(f"  Value:       {m.get('value')}")
            out.append(f"  Computed at: {m.get('computed_at')}")
        out.append("")
        out.append(
            "Cached value updated by the indicator pipeline. For a Chainlink-"
            "attested on-chain value, use oracle.request() — see "
            "get_integration_guide()."
        )
        return "\n".join(out)
  • The tool's docstring serves as its schema: defines the 'feed_name' string parameter and describes the return format (value + computed_at + chain). Input is validated implicitly by matching against the live cache.
    async def get_feed_value(feed_name: str) -> str:
        """Get the latest computed value of a Pythia indicator feed.
    
        Reads from the live cache (feed_values table) populated by the indicator
        pipeline on every cycle. Off-chain AI agents use this when reasoning
        about a Vision context, choosing an Event threshold, or sanity-checking
        a feed's current level. On-chain consumers should request the value
        through oracle.request() to get a Chainlink-attested response — see
        get_integration_guide().
    
        Args:
            feed_name: full feed name (e.g. 'bitcoin_RSI_1H_14', 'pol_EMA_5M_20').
    
        Returns:
            Latest value + computed_at + chain, one block per chain if a feed
            exists on multiple chains. If the feed has no cached value, returns
            a diagnostic pointer (warm-up window, deactivated, or unknown name).
        """
  • The `@mcp.tool()` decorator registers the function as an MCP tool named 'get_feed_value'.
    @mcp.tool()
    async def get_feed_value(feed_name: str) -> str:
Behavior4/5

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

No annotations provided, so description carries full burden. It discloses read from cache, return structure, and diagnostic responses for missing feeds, but lacks details on authorization 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.

Conciseness4/5

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

Well-structured with purpose, usage notes, parameter detail, and return info. Slightly longer than minimal but each sentence adds value.

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?

Handles edge cases (multiple chains, missing values), describes return structure, and references a related tool for on-chain use. Complete for a single-parameter tool with output schema.

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

Parameters5/5

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

Schema has no description for the only parameter (0% coverage). Description compensates by providing examples and format for feed_name, adding critical meaning.

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?

Clearly states it retrieves the latest computed value of a Pythia indicator feed, distinguishes between off-chain and on-chain usage, and differentiates from sibling tools.

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

Usage Guidelines5/5

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

Explicitly states when to use (off-chain reasoning) and when not to (on-chain should use oracle.request()), and provides guidance for missing feeds via diagnostic pointers.

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