Skip to main content
Glama
TaylorChen

Multi-MCPs

by TaylorChen

get_coin_price

Retrieve current cryptocurrency prices by specifying coin identifier and target currency. This tool provides real-time market data for informed trading decisions.

Instructions

Get current price for a coin in a given currency

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
coin_idYes
vs_currencyYes

Implementation Reference

  • The asynchronous handler function that implements the core logic for the get_coin_price tool. It extracts and validates the coin_id and vs_currency arguments, then calls the CoinGeckoClient's getPrice method.
    async get_coin_price(args: Record<string, unknown>) {
      const coinId = String(args.coin_id || "");
      const vsCurrency = String(args.vs_currency || "");
      if (!coinId || !vsCurrency) throw new Error("coin_id and vs_currency are required");
      return client.getPrice(coinId, vsCurrency);
    },
  • The schema definition for the get_coin_price tool, specifying the name, description, and input schema requiring coin_id and vs_currency as strings.
    {
      name: "get_coin_price",
      description: "Get current price for a coin in a given currency",
      inputSchema: {
        type: "object",
        properties: { coin_id: { type: "string" }, vs_currency: { type: "string" } },
        required: ["coin_id", "vs_currency"],
      },
  • The registerCoinGecko function that returns a ToolRegistration object containing the tool schemas and handlers for CoinGecko API tools, including get_coin_price.
    export function registerCoinGecko(): ToolRegistration {
      const client = new CoinGeckoClient();
      return {
        tools: [
          {
            name: "get_coin_price",
            description: "Get current price for a coin in a given currency",
            inputSchema: {
              type: "object",
              properties: { coin_id: { type: "string" }, vs_currency: { type: "string" } },
              required: ["coin_id", "vs_currency"],
            },
          },
          {
            name: "get_trending_coins",
            description: "Get trending coins on CoinGecko",
            inputSchema: { type: "object", properties: {} },
          },
          {
            name: "get_market_data",
            description: "Get market data for a coin",
            inputSchema: {
              type: "object",
              properties: { coin_id: { type: "string" } },
              required: ["coin_id"],
            },
          },
        ],
        handlers: {
          async get_coin_price(args: Record<string, unknown>) {
            const coinId = String(args.coin_id || "");
            const vsCurrency = String(args.vs_currency || "");
            if (!coinId || !vsCurrency) throw new Error("coin_id and vs_currency are required");
            return client.getPrice(coinId, vsCurrency);
          },
          async get_trending_coins() {
            return client.getTrending();
          },
          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);
          },
        },
      };
    }
  • Includes the CoinGecko registration in the array of all tool registrations within registerAllTools.
    registerCoinGecko(),
  • Helper method in CoinGeckoClient that makes the API request to retrieve the coin price.
    getPrice(coinId: string, vsCurrency: string) {
      return this.request(`/simple/price`, { query: { ids: coinId, vs_currencies: vsCurrency } });
Behavior2/5

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

No annotations are provided, so the description carries full burden. It states it 'Get[s] current price' which implies a read-only operation, but doesn't disclose behavioral traits like rate limits, authentication needs, data freshness (how 'current' is defined), error conditions, or response format. For a tool with zero annotation coverage, this leaves significant gaps in understanding how it behaves.

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?

The description is a single, efficient sentence that front-loads the core functionality with zero wasted words. Every word earns its place: 'Get' (action), 'current price' (what), 'for a coin' (target), 'in a given currency' (context).

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness2/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given no annotations, no output schema, and 0% schema description coverage for a 2-parameter tool, the description is incomplete. It covers the basic purpose but lacks crucial context: expected response format, error handling, data sources, currency/coin code standards, or performance characteristics. For a price lookup tool, users need to know what 'current' means and how results are structured.

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

Parameters2/5

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

Schema description coverage is 0%, so the description must compensate. It mentions 'coin' and 'currency' which map to the two parameters (coin_id, vs_currency), but provides no semantic details beyond their names - no format examples (e.g., 'bitcoin' vs 'BTC'), valid values, or constraints. This adds minimal value beyond what's inferable from parameter names alone.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states the tool's purpose: 'Get current price for a coin in a given currency' - a specific verb ('Get') and resource ('price') with scope ('coin', 'currency'). It distinguishes from siblings like 'get_market_data' or 'get_trending_coins' by focusing on a single coin's price rather than broader market data or trending lists. However, it doesn't explicitly contrast with these alternatives.

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

Usage Guidelines2/5

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

The description provides no guidance on when to use this tool versus alternatives. With siblings like 'get_market_data' and 'get_trending_coins' that might overlap in cryptocurrency price functionality, there's no indication of when this specific coin-price tool is preferred, nor any prerequisites or exclusions mentioned.

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

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