Skip to main content
Glama
JCF0

CG Alpha MCP

by JCF0

elfa_trending_tokens

Read-only

Identify trending cryptocurrency tokens by analyzing aggregated sentiment data across specified timeframes and blockchain networks to support market analysis decisions.

Instructions

Trending tokens aggregation. Params: timeframe, chain, limit, cursor.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
timeframeNo
chainNo
limitNo
cursorNo

Implementation Reference

  • Primary MCP tool handler for 'elfa_trending_tokens'. Parses input arguments into query parameters and delegates to the generic 'elfa_query' tool which fetches from the ELFA API endpoint '/v2/aggregations/trending-tokens'.
    "elfa_trending_tokens": async (args, meta) => {
      const query = {};
      if (args && args.timeframe !== undefined) query.timeframe = args.timeframe; // "24h","7d","30d"
      if (args && args.chain     !== undefined) query.chain     = args.chain;
      if (args && args.limit     !== undefined) query.limit     = args.limit;
      if (args && args.cursor    !== undefined) query.cursor    = args.cursor;
      return toolHandlers["elfa_query"]({ path: "/v2/aggregations/trending-tokens", method: "GET", query }, meta);
    },
  • Tool schema definition including input schema, description, and annotations for registration in the MCP tools list.
    { name:"elfa_trending_tokens",
      description:"Trending tokens aggregation. Params: timeframe, chain, limit, cursor.",
      inputSchema:{ type:"object", properties:{
        timeframe:{type:"string"}, chain:{type:"string"}, limit:{type:"number"}, cursor:{type:"string"}
      }},
      annotations:{ title:"ELFA: Trending Tokens", readOnlyHint:true, openWorldHint:true }
  • Supporting handler function 'elfaTrendingTokens' (camelCase) that performs the API call to the same ELFA endpoint. Used in the HTTP debug server (index.js).
    export const elfaTrendingTokens = async ({ timeWindow='7d', page=1, pageSize=50, minMentions=5, from=null, to=null }) => {
      const params = { page, pageSize, minMentions };
      if (from != null && to != null) { params.from = from; params.to = to; }
      else { params.timeWindow = timeWindow; }
      return safeGet('/v2/aggregations/trending-tokens', params);
    };
  • mcp-server.js:185-187 (registration)
    Alias handler 'elfa_trending' that registers and delegates directly to the 'elfa_trending_tokens' implementation.
    "elfa_trending": async (args, meta) => {
      return toolHandlers["elfa_trending_tokens"](args, meta);
    },
  • Generic helper 'elfaFetch' used by the 'elfa_query' tool to perform HTTP requests to the ELFA API.
    async function elfaFetch(pathname, options){
      const o = options || {};
      const method = (o.method || "GET").toUpperCase();
      const query = o.query || null;
      const body  = o.body  || null;
    
      const url = new URL(pathname, ELFA_BASE);
      if (query && typeof query === "object") {
        for (const k of Object.keys(query)) {
          const v = query[k];
          if (v !== undefined && v !== null) url.searchParams.set(k, String(v));
        }
      }
    
      const headers = { "Accept": "application/json" };
      applyAuth(headers);
      if (body && method !== "GET") headers["Content-Type"] = "application/json";
    
      const res = await fetch(url, { method, headers, body: body && method !== "GET" ? JSON.stringify(body) : undefined });
      const raw = await res.text();
      let data; try { data = raw ? JSON.parse(raw) : null; } catch { data = { raw }; }
      return { ok: res.ok, status: res.status, data };
    }
Behavior3/5

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

Annotations provide readOnlyHint=true and openWorldHint=true, indicating it's a safe read operation with open-world data. The description adds minimal behavioral context by listing parameters but doesn't disclose details like rate limits, authentication needs, or what 'aggregation' entails (e.g., sorting, filtering). No contradiction with annotations exists, but the description adds little beyond what annotations already cover.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is very concise with two short sentences, front-loading the purpose and then listing parameters. There's no wasted text, but it could be more structured by explaining parameters briefly. It's appropriately sized for a simple tool but lacks depth.

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 4 parameters with 0% schema coverage, no output schema, and annotations covering only safety aspects, the description is incomplete. It doesn't explain what the tool returns (e.g., list of tokens with metrics), how parameters interact, or provide examples. For a data aggregation tool with multiple inputs, this leaves significant gaps for an agent to use it correctly.

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 schema provides no parameter details. The description lists parameter names ('timeframe, chain, limit, cursor') but doesn't explain their meanings, expected formats (e.g., timeframe as '1d' or '7d'), or constraints. This adds minimal value beyond the bare schema, failing to compensate for the low coverage.

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

Purpose3/5

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

The description states 'Trending tokens aggregation' which indicates the tool aggregates trending tokens, but it's vague about what 'trending' means (e.g., by price, volume, social mentions) and doesn't specify the resource or output format. It distinguishes from siblings like 'elfa_trending' (which might be broader) and 'elfa_token_news' (news-focused), but the distinction is implicit rather than explicit.

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?

No guidance is provided on when to use this tool versus alternatives. It doesn't mention when to choose it over 'elfa_trending' (which might be a similar tool) or 'elfa_keyword_mentions' (which could overlap in token analysis), and there are no prerequisites or exclusions stated in the description.

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/JCF0/cg-alpha-mcp'

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