Skip to main content
Glama

get_watchlist_report

Analyze multiple assets to get cycle position, risk level, and volume health while detecting state changes since the last check.

Instructions

Analyze multiple assets at once. Returns cycle position, risk level, and volume health for each. Detects state changes since last check. Max 10 assets.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
assetsYesArray of asset names/symbols, e.g. ["btc", "eth", "sol", "avax"]

Implementation Reference

  • The handler function getWatchlistReport which retrieves asset context for a list of assets, compares their current state with the previous snapshot, and generates a report.
    export async function getWatchlistReport(cache: CacheService, assets: string[]): Promise<WatchlistReportOutput | ErrorOutput> {
      if (assets.length === 0) {
        return {
          error: true, error_source: 'get_watchlist_report',
          agent_guidance: 'No assets provided. Pass an array of asset names, e.g. ["btc", "eth", "sol"].',
          last_known_data: null, data_warnings: ['Empty asset list.'],
        };
      }
    
      const limited = assets.slice(0, 10);
    
      try {
        const results = await Promise.allSettled(
          limited.map(a => getAssetContext(cache, a))
        );
    
        const previous = getWatchlistSnapshot(AGENT_ID);
        const prevMap = new Map<string, WatchlistSnapshot>();
        if (previous) {
          for (const s of previous.snapshots) prevMap.set(s.asset.toLowerCase(), s);
        }
    
        const watchlistAssets: WatchlistAsset[] = [];
        const elevatedVolume: string[] = [];
    
        for (const r of results) {
          if (r.status !== 'fulfilled') continue;
          const data = r.value;
          if ('error' in data) continue;
    
          const asset = data as AssetContextOutput;
          const prev = prevMap.get(asset.asset.toLowerCase());
    
          let changed = false;
          let changeDetail = 'No change since last check.';
          if (prev) {
            const changes: string[] = [];
            if (prev.cycle_position !== asset.cycle_position) changes.push(`cycle: ${prev.cycle_position} → ${asset.cycle_position}`);
            if (prev.risk_level !== asset.risk_level) changes.push(`risk: ${prev.risk_level} → ${asset.risk_level}`);
            if (prev.price_trend !== asset.price_trend) changes.push(`trend: ${prev.price_trend} → ${asset.price_trend}`);
            if (changes.length > 0) {
              changed = true;
              changeDetail = changes.join(', ');
            }
          } else {
            changeDetail = 'First check — no prior data.';
          }
    
          if (asset.volume_health === 'elevated' || asset.volume_health === 'extreme') {
            elevatedVolume.push(asset.asset);
          }
    
          watchlistAssets.push({
            asset: asset.asset,
            price_usd: asset.price_usd,
            cycle_position: asset.cycle_position,
            risk_level: asset.risk_level,
            volume_health: asset.volume_health,
            price_trend: asset.price_trend,
            holder_behavior: asset.holder_behavior,
            changed_since_last_check: changed,
            change_detail: changeDetail,
          });
        }
    
        // Save current snapshot for next comparison
        const snapshots: WatchlistSnapshot[] = watchlistAssets.map(a => ({
          asset: a.asset,
          cycle_position: a.cycle_position,
          risk_level: a.risk_level,
          price_trend: a.price_trend,
          volume_health: a.volume_health,
          timestamp: new Date().toISOString(),
        }));
        saveWatchlistSnapshot(AGENT_ID, snapshots);
    
        const stateChanges = watchlistAssets.filter(a => a.changed_since_last_check);
        const sorted = [...watchlistAssets].sort((a, b) => (RISK_ORDER[b.risk_level] ?? 0) - (RISK_ORDER[a.risk_level] ?? 0));
        const highestRisk = sorted[0]?.asset ?? 'none';
        const lowestRisk = sorted[sorted.length - 1]?.asset ?? 'none';
    
        let guidance = `Watchlist: ${watchlistAssets.length} assets analyzed. `;
        if (stateChanges.length > 0) {
          guidance += `STATE CHANGES DETECTED: ${stateChanges.map(s => `${s.asset} (${s.change_detail})`).join('; ')}. Review these positions. `;
        } else {
          guidance += 'No state changes since last check. ';
        }
        if (elevatedVolume.length > 0) {
          guidance += `Elevated volume on: ${elevatedVolume.join(', ')}. `;
        }
        guidance += `Highest risk: ${highestRisk}. Lowest risk: ${lowestRisk}.`;
    
        return {
          assets: watchlistAssets,
          state_changes: stateChanges,
          elevated_volume_assets: elevatedVolume,
          highest_risk_asset: highestRisk,
          lowest_risk_asset: lowestRisk,
          total_assets: watchlistAssets.length,
          agent_guidance: guidance,
        };
      } catch {
        return {
          error: true, error_source: 'get_watchlist_report',
          agent_guidance: 'Watchlist report temporarily unavailable. Retry shortly.',
          last_known_data: null, data_warnings: ['Watchlist service temporarily unavailable.'],
        };
      }
    }
  • Data interfaces defining the schema for the WatchlistReport output.
    export interface WatchlistAsset {
      asset: string;
      price_usd: number;
      cycle_position: string;
      risk_level: string;
      volume_health: string;
      price_trend: string;
      holder_behavior: string;
      changed_since_last_check: boolean;
      change_detail: string;
    }
    
    export interface WatchlistReportOutput {
      assets: WatchlistAsset[];
      state_changes: WatchlistAsset[];
      elevated_volume_assets: string[];
      highest_risk_asset: string;
      lowest_risk_asset: string;
      total_assets: number;
      agent_guidance: string;
    }
Behavior3/5

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

Discloses key behavioral traits: comparative analysis ('state changes since last check'), return dimensions (cycle position, risk, volume), and hard limit (max 10). Without annotations, missing operational details like rate limits, caching/TTL for 'last check', or error behaviors.

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?

Four sentences, zero waste. Front-loaded with core action ('Analyze multiple assets'), followed by outputs, behavior, and constraints. Each sentence earns its place with distinct information.

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 output schema, the description appropriately explains return values (cycle position, risk level, volume health). Covers the tool's comparative nature and batch constraints. Could mention error handling or invalid asset behavior, but sufficient for selection.

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

Parameters3/5

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

With 100% schema coverage (assets array documented with examples), baseline is 3. Description reinforces the maxItems constraint ('Max 10 assets') but doesn't add parameter syntax, format details, or validation rules beyond the schema.

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?

States specific action ('Analyze multiple assets') and distinguishes from single-asset siblings like get_asset_context/get_asset_momentum. Specifies exact analysis dimensions (cycle position, risk level, volume health) that clarify the tool's scope.

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

Usage Guidelines3/5

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

Implies monitoring use case via 'Detects state changes since last check' and states the 'Max 10 assets' constraint. However, lacks explicit guidance on when to prefer this over single-asset alternatives or when-not-to-use conditions.

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