Skip to main content
Glama

get_stablecoin_flows

Track stablecoin supply changes across major assets to monitor capital flows in crypto markets, providing minting/redemption data, net flow signals, and depeg warnings.

Instructions

Track stablecoin supply changes across USDT, USDC, and all major stablecoins. Shows total supply, 24h/7d/30d minting and redemptions, net capital flow signal, depeg warnings, and liquidity assessment. Stablecoin flows are a leading indicator of capital entering or leaving crypto.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Implementation Reference

  • The main handler function for the get_stablecoin_flows tool, which fetches data, processes it into a summary and guidance, and caches the result.
    export async function getStablecoinFlowsTool(cache: CacheService): Promise<StablecoinFlowsOutput | ErrorOutput> {
      const cached = cache.get<StablecoinFlowsOutput>(CACHE_KEY);
      if (cached) return cached.data;
    
      try {
        const data = await getStablecoinData();
    
        const summary = generateSummary(data);
        const guidance = generateGuidance(data);
    
        const result: StablecoinFlowsOutput = {
          total_supply_usd: data.total_supply_usd,
          change_24h_usd: data.total_change_24h_usd,
          change_7d_usd: data.total_change_7d_usd,
          change_30d_usd: data.total_change_30d_usd,
          change_24h_pct: data.total_change_24h_pct,
          change_7d_pct: data.total_change_7d_pct,
          change_30d_pct: data.total_change_30d_pct,
          net_flow_signal: data.net_flow_signal,
          top_stablecoins: data.top_stablecoins.map(s => ({
            symbol: s.symbol,
            circulating_usd: s.circulating_usd,
            change_7d_pct: s.change_7d_pct,
            peg_price: s.peg_price,
            depeg_risk: s.depeg_risk,
          })),
          depeg_warnings: data.depeg_warnings,
          liquidity_summary: summary,
          agent_guidance: guidance,
        };
    
        cache.set(CACHE_KEY, result, getCacheTtl(BASE_TTL));
        return result;
      } catch (err) {
        return {
          error: true,
          error_source: 'get_stablecoin_flows',
          agent_guidance: 'Stablecoin data unavailable. Cannot assess capital inflows, minting activity, or depeg risk. This is a critical liquidity signal — proceed conservatively without it.',
          last_known_data: cache.get<StablecoinFlowsOutput>(CACHE_KEY)?.data ?? null,
          data_warnings: ['Stablecoin data source temporarily unavailable.'],
        };
      }
    }
  • Schema definition for the output of the get_stablecoin_flows tool.
    export interface StablecoinFlowsOutput {
      total_supply_usd: number;
      change_24h_usd: number;
      change_7d_usd: number;
      change_30d_usd: number;
      change_24h_pct: number;
      change_7d_pct: number;
      change_30d_pct: number;
      net_flow_signal: string;
      top_stablecoins: Array<{
        symbol: string;
        circulating_usd: number;
        change_7d_pct: number;
        peg_price: number | null;
        depeg_risk: boolean;
      }>;
      depeg_warnings: string[];
      liquidity_summary: string;
      agent_guidance: string;
    }
Behavior3/5

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

With no annotations provided, description carries the full burden. It effectively discloses return data structure (total supply, 24h/7d/30d minting/redemptions, depeg warnings, liquidity assessment) and semantic meaning (net capital flow signal). Missing operational details like data freshness, rate limits, or pagination behavior.

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 sentences with zero waste: (1) core purpose and scope, (2) specific data points returned, (3) interpretive value/usage context. Logical progression from what to why. Every sentence earns its place.

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 and no output schema, description adequately compensates by detailing return value structure (timeframes, warning types, assessments). Sufficient for a simple retrieval tool, though mentioning data latency or granularity would improve completeness.

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. Per evaluation rules, baseline score is 4 for parameter-less tools. No parameters exist requiring semantic clarification.

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?

Specific verb 'Track' + specific resource 'stablecoin supply changes' with clear scope (USDT, USDC, all major). Explicitly distinguishes from generic siblings like get_asset_context or get_onchain_pulse by focusing specifically on stablecoin mechanics.

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?

Provides strong contextual guidance by stating these flows are a 'leading indicator of capital entering or leaving crypto,' signaling when to invoke (capital flow analysis). Lacks explicit naming of alternative tools (e.g., get_onchain_pulse), so stops short of score 5.

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/0xHashy/fathom-fyi'

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