Skip to main content
Glama

elfa_trending

Analyze trending cryptocurrency tokens with timeframes, chains, and limits using sentiment data and technical analysis tools to monitor token performance.

Instructions

Alias to /v2/aggregations/trending-tokens (timeframe, chain, limit, cursor).

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
chainNo
cursorNo
limitNo
timeframeNo

Implementation Reference

  • mcp-server.js:296-301 (registration)
    Registration of the 'elfa_trending' MCP tool, including name, description, input schema (timeframe, chain, limit, cursor), and annotations.
    { name:"elfa_trending", description:"Alias to /v2/aggregations/trending-tokens (timeframe, chain, limit, cursor).", inputSchema:{ type:"object", properties:{ timeframe:{type:"string"}, chain:{type:"string"}, limit:{type:"number"}, cursor:{type:"string"} }}, annotations:{ title:"ELFA: Trending (Alias)", readOnlyHint:true, openWorldHint:true }
  • Handler function for the 'elfa_trending' tool. It is an alias that delegates to the 'elfa_trending_tokens' handler.
    "elfa_trending": async (args, meta) => { return toolHandlers["elfa_trending_tokens"](args, meta); },
  • Handler for 'elfa_trending_tokens' (invoked by 'elfa_trending'), constructs query parameters and calls the generic elfa_query tool to fetch from ELFA API /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); },
  • mcp-server.js:303-308 (registration)
    Registration of the 'elfa_trending_tokens' MCP tool, which implements the core logic delegated by 'elfa_trending'.
    { 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 }
  • Generic 'elfa_query' handler used by 'elfa_trending_tokens' to proxy requests to the ELFA API, including progress notifications.
    "elfa_query": async (args, meta) => { const path = args && args.path; if (!path || typeof path !== "string") return { content: textContent({ error:true, message:"Missing required 'path' (string)" }), isError:true }; const method = (args.method || "GET").toUpperCase(); const query = args.query || undefined; const body = args.body || undefined; progressNotify(meta && meta.progressToken, 1, 3, "Calling ELFA"); const { ok, status, data } = await elfaFetch(path, { method, query, body }); progressNotify(meta && meta.progressToken, 2, 3, "Formatting result"); if (!ok) return { content: textContent({ error:true, status, data }), isError:true, _meta:{ status } }; progressNotify(meta && meta.progressToken, 3, 3, "Done"); return { content: textContent({ ok:true, status, data }) }; },

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