Skip to main content
Glama

get_macro_context

Retrieve macroeconomic indicators for cryptocurrency analysis, including Federal Funds Rate, DXY, yield curve, recession probability, and net crypto impact.

Instructions

Get macro economic context for crypto: Federal Funds Rate, DXY (dollar strength), yield curve, recession probability, and net macro impact on crypto.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Implementation Reference

  • The handler function for the `get_macro_context` tool, which fetches macro data, evaluates crypto impacts, and generates a context summary and guidance.
    export async function getMacroContext(cache: CacheService): Promise<MacroContextOutput | ErrorOutput> {
      const cached = cache.get<MacroContextOutput>(CACHE_KEY);
      if (cached) return cached.data;
    
      try {
        const macro = await getMacroData();
    
        // Determine crypto impact
        const impact = determineCryptoImpact(macro.dxyTrend, macro.fedFundsTrend, macro.yieldCurveState);
    
        // Recession probability
        const recessionProb = determineRecessionProbability(macro.yieldCurveState, macro.fedFundsTrend);
    
        // Summary
        const summary = generateMacroSummary(macro, impact, recessionProb);
        const guidance = generateMacroGuidance(impact, recessionProb, macro.fedFundsTrend, macro.dxyTrend);
    
        const result: MacroContextOutput = {
          fed_funds_rate: macro.fedFundsRate ?? 0,
          fed_funds_trend: macro.fedFundsTrend,
          dxy_value: macro.dxyValue ?? 0,
          dxy_trend: macro.dxyTrend,
          yield_curve: macro.yieldCurve ?? 0,
          yield_curve_state: macro.yieldCurveState,
          recession_probability: recessionProb,
          macro_crypto_impact: impact,
          macro_summary: summary,
          agent_guidance: guidance,
        };
    
        cache.set(CACHE_KEY, result, getCacheTtl(BASE_TTL));
        return result;
      } catch (err) {
        return {
          error: true,
          error_source: 'get_macro_context',
          agent_guidance: 'Macro context unavailable (FRED API). Without macro backdrop, assume neutral-to-cautious conditions. Do not assume monetary policy is favorable — check manually before large allocations.',
          last_known_data: cache.get<MacroContextOutput>(CACHE_KEY)?.data ?? null,
          data_warnings: ['Macro data source temporarily unavailable. Retry shortly.'],
        };
      }
    }
Behavior2/5

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

No annotations provided, so full burden falls on description. While 'Get' implies read-only behavior, the description fails to disclose whether this requires authentication, if data is real-time versus cached, potential rate limits, or failure modes when macro data is unavailable.

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?

Single sentence efficiently front-loaded with the action and domain. The colon-separated list of specific metrics is information-dense without being verbose, though slight restructuring could improve scannability.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness3/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Without an output schema, the description partially compensates by enumerating the specific data points returned (Fed Funds Rate, DXY, etc.), but lacks structural details about the response format, data types, or whether all fields are always present versus optionally null.

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?

Zero parameters present, meeting the baseline of 4. With no input parameters, there are no semantics to clarify beyond the schema, and the description appropriately indicates this is a parameterless retrieval operation.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

Clear verb 'Get' and resource 'macro economic context for crypto' with specific output fields listed (Fed Funds Rate, DXY, yield curve, recession probability, net macro impact). Distinguishes from siblings like get_asset_context and get_chain_context by specifying macroeconomic rather than asset-specific or on-chain data, though explicit comparative guidance is absent.

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

Usage Guidelines2/5

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

No guidance provided on when to use this versus sibling tools like get_asset_context, get_chain_context, or get_temporal_context. No mention of prerequisites, sequencing, or conditions where this tool is most valuable versus alternatives.

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