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
| Name | Required | Description | Default |
|---|---|---|---|
| symbols | Yes | Comma-separated symbols (e.g., "BTC,ETH,SOL") |
Implementation Reference
- index.js:340-352 (handler)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; } - index.js:300-309 (schema)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'] } },