Skip to main content
Glama

compare

Compare multiple cryptocurrency assets side by side to analyze prices, price changes, and market capitalizations in real-time.

Instructions

Compare multiple assets side by side — prices, changes, market caps.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
symbolsYesComma-separated symbols (e.g., "BTC,ETH,SOL")

Implementation Reference

  • Handler implementation for the 'compare' tool, which iterates through provided symbols and fetches their prices.
    case 'compare': {
      const symbols = args.symbols.split(',').map(s => s.trim());
      const results = [];
      for (const sym of symbols.slice(0, 10)) {
        try {
          const p = await getCryptoPrice(sym);
          results.push(p);
        } catch (e) {
          results.push({ symbol: sym, error: e.message });
        }
      }
      return results;
    }
  • Schema definition for the 'compare' tool, specifying input 'symbols' as a required string.
      name: 'compare',
      description: 'Compare multiple assets side by side — prices, changes, market caps.',
      inputSchema: {
        type: 'object',
        properties: {
          symbols: { type: 'string', description: 'Comma-separated symbols (e.g., "BTC,ETH,SOL")' }
        },
        required: ['symbols']
      }
    },

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/ShipItAndPray/mcp-market-data'

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