Skip to main content
Glama
TaylorChen

Multi-MCPs

by TaylorChen

get_market_data

Retrieve cryptocurrency market data for a specified coin, providing price and trading information through the Multi-MCPs server's unified API integration.

Instructions

Get market data for a coin

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
coin_idYes

Implementation Reference

  • The handler function that executes the get_market_data tool: extracts coin_id from input arguments, validates it, and delegates to the CoinGeckoClient's getMarketData method.
    async get_market_data(args: Record<string, unknown>) {
      const coinId = String(args.coin_id || "");
      if (!coinId) throw new Error("coin_id is required");
      return client.getMarketData(coinId);
    },
  • Input schema for the get_market_data tool, requiring a 'coin_id' string parameter.
    inputSchema: {
      type: "object",
      properties: { coin_id: { type: "string" } },
      required: ["coin_id"],
    },
  • Tool registration object for get_market_data, including name, description, and input schema, added to the tools array in registerCoinGecko().
    {
      name: "get_market_data",
      description: "Get market data for a coin",
      inputSchema: {
        type: "object",
        properties: { coin_id: { type: "string" } },
        required: ["coin_id"],
      },
    },
  • Helper method in CoinGeckoClient class that fetches market data from CoinGecko API for a given coin ID.
    getMarketData(coinId: string) {
      return this.request(`/coins/${coinId}`);
    }

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/TaylorChen/muti-mcps'

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