Skip to main content
Glama
pythia-the-oracle

pythia-oracle-mcp

Official

list_subscriptions

Retrieve all active event subscriptions for a given wallet address, eliminating the need to replay historical logs to discover current subscriptions.

Instructions

Enumerate active Pythia Event subscriptions owned by an address.

Returns every subscription where active=true (not yet fired, expired, or cancelled). Without this tool, dApps and dashboards have to replay every SubscriptionCreated log from the registry deploy block to discover what an owner is currently subscribed to.

Args: owner_address: subscriber wallet address ('0x...', case-insensitive).

Returns: Multi-section report listing each active subscription with feed name, condition + threshold, expiry, registry address, and creation tx.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
owner_addressYes

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
resultYes

Implementation Reference

  • The main handler function for the 'list_subscriptions' tool. It takes an owner_address parameter, fetches live data from feed-status.json, filters subscriptions by owner, and returns a formatted report of active Pythia Event subscriptions.
    async def list_subscriptions(owner_address: str) -> str:
        """Enumerate active Pythia Event subscriptions owned by an address.
    
        Returns every subscription where active=true (not yet fired, expired, or
        cancelled). Without this tool, dApps and dashboards have to replay every
        SubscriptionCreated log from the registry deploy block to discover what
        an owner is currently subscribed to.
    
        Args:
            owner_address: subscriber wallet address ('0x...', case-insensitive).
    
        Returns:
            Multi-section report listing each active subscription with feed name,
            condition + threshold, expiry, registry address, and creation tx.
        """
        addr = owner_address.strip().lower()
        if not addr.startswith("0x"):
            addr = "0x" + addr
    
        data = await _fetch_data()
        events = data.get("events", {}) if data else {}
        subs = events.get("subscriptions", [])
    
        matched = [s for s in subs if (s.get("owner") or "").lower() == addr]
    
        if not matched:
            return (
                f"No active subscriptions for {addr}.\n"
                "This means: never subscribed on a tracked registry, all "
                "subscriptions already fired / expired / cancelled, or the\n"
                "off-chain sync hasn't caught up yet (event_sync.py runs every "
                "2 minutes)."
            )
    
        out = [
            f"Active Pythia Event subscriptions for {addr}",
            f"Count: {len(matched)}",
            "",
        ]
        for i, s in enumerate(matched, 1):
            out.append(f"[{i}] sub_id={s.get('sub_id')} on {s.get('source_chain')}")
            out.append(f"    Registry:   {s.get('registry')}")
            feed_id = s.get("feed_id") or ""
            feed_id_short = (feed_id[:12] + "…") if len(feed_id) > 14 else feed_id
            out.append(f"    Feed:       {s.get('feed_name', '?')} ({feed_id_short})")
            out.append(f"    Condition:  {s.get('condition')} {s.get('threshold')}")
            out.append(f"    Feed chain: {s.get('feed_chain')}")
            out.append(f"    Expires:    {s.get('expires_at')}")
            out.append(f"    Created:    {s.get('created_at')}")
            if s.get("tx_hash"):
                out.append(f"    Tx:         {s.get('tx_hash')}")
            out.append("")
    
        out.append(
            "Cancel early via cancelSubscription(sub_id) on the registry — "
            "refunds remaining whole-day LINK."
        )
        return "\n".join(out)
  • Registration of 'list_subscriptions' as an MCP tool via the @mcp.tool() decorator on line 1274.
    @mcp.tool()
    async def list_subscriptions(owner_address: str) -> str:
        """Enumerate active Pythia Event subscriptions owned by an address.
Behavior3/5

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

No annotations are provided, so the description must carry the full burden. It discloses that only active subscriptions are returned and mentions the output fields, but does not specify auth requirements, rate limits, or whether it is read-only (implied).

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?

The description is well-structured with separate paragraphs for purpose, context, args, and returns. The 'Without this tool' sentence adds value but increases length slightly. Could be more concise.

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 the single parameter and presence of an output schema, the description adequately covers the input, output fields, and use case. It is complete for the tool's complexity.

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?

With 0% schema coverage, the description fully compensates by explaining that owner_address is a case-insensitive wallet address in '0x...' format, adding semantics beyond the schema's type string.

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 the verb 'Enumerate' and the resource 'active Pythia Event subscriptions owned by an address', differentiating it from sibling tools like check_oracle_health or get_feed_value.

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?

The description provides a clear use case by explaining the alternative (replaying logs) that this tool avoids, but does not explicitly list when not to use it or compare to other tools.

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