Skip to main content
Glama

crypto_portfolio

Track real-time cryptocurrency portfolio values using CoinGecko data to monitor investment performance and make informed decisions.

Instructions

Get real-time crypto portfolio value from CoinGecko (no fake numbers)

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
coinsNoComma-separated coin IDs (default: bitcoin,ethereum,solana)bitcoin,ethereum,solana

Implementation Reference

  • The 'crypto_portfolio' tool handler, which fetches cryptocurrency prices using 'getCryptoPrice' and formats the output.
    case "crypto_portfolio": {
      const coins = ((args as any).coins || "bitcoin,ethereum,solana").split(",");
      const results: string[] = [];
      for (const coin of coins) {
        const data = getCryptoPrice(coin.trim());
        if (data && data[coin.trim()]) {
          const d = data[coin.trim()];
          results.push(`${coin.trim().toUpperCase()}: $${d.usd?.toLocaleString()} (${d.usd_24h_change?.toFixed(2)}%) — MCap: $${(d.usd_market_cap / 1e9).toFixed(1)}B`);
        }
      }
      return {
        content: [{ type: "text", text: results.join("\n") || "Unable to fetch prices" }],
      };
    }
  • src/index.ts:317-326 (registration)
    Registration of the 'crypto_portfolio' tool within the MCP server definition.
    {
      name: "crypto_portfolio",
      description: "Get real-time crypto portfolio value from CoinGecko (no fake numbers)",
      inputSchema: {
        type: "object" as const,
        properties: {
          coins: { type: "string", description: "Comma-separated coin IDs (default: bitcoin,ethereum,solana)", default: "bitcoin,ethereum,solana" },
        },
      },
    },

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/ElromEvedElElyon/revenue-mcp'

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