Skip to main content
Glama

DeFi Trading Agent MCP Server

by edkdev

get_recently_updated_tokens

Retrieve details of recently updated tokens, including optional network filters, to support real-time trading decisions and market analysis in decentralized finance.

Instructions

Get recently updated tokens with their information

Input Schema

NameRequiredDescriptionDefault
includeNoAttributes to include: 'network' (optional)
networkNoNetwork ID to filter by (optional, e.g., 'eth', 'bsc', 'polygon_pos')

Input Schema (JSON Schema)

{ "properties": { "include": { "description": "Attributes to include: 'network' (optional)", "enum": [ "network" ], "type": "string" }, "network": { "description": "Network ID to filter by (optional, e.g., 'eth', 'bsc', 'polygon_pos')", "type": "string" } }, "required": [], "type": "object" }

Implementation Reference

  • Tool handler function that delegates to CoinGeckoApiService and formats the response for the MCP tool.
    async getRecentlyUpdatedTokens(options = {}) { const result = await this.coinGeckoApi.getRecentlyUpdatedTokens(options); return { message: "Recently updated tokens retrieved successfully", data: result, summary: `Found ${result.data?.length || 0} recently updated tokens${ options.network ? ` on ${options.network}` : " across all networks" }`, includes: options.include ? options.include.split(",") : [], }; }
  • Core implementation that makes the HTTP request to CoinGecko API endpoint /tokens/info_recently_updated
    async getRecentlyUpdatedTokens(options = {}) { try { const queryParams = new URLSearchParams(); if (options.include) queryParams.append('include', options.include); if (options.network) queryParams.append('network', options.network); const url = `${this.baseUrl}/tokens/info_recently_updated${queryParams.toString() ? '?' + queryParams.toString() : ''}`; const response = await fetch(url, { headers: { 'x-cg-demo-api-key': this.apiKey } }); if (!response.ok) { throw new Error(`HTTP ${response.status}: ${response.statusText}`); } return await response.json(); } catch (error) { throw new Error(`Failed to get recently updated tokens: ${error.message}`); } }
  • Input schema definition for the tool, registered in the MCP server's listTools handler.
    name: TOOL_NAMES.GET_RECENTLY_UPDATED_TOKENS, description: "Get recently updated tokens with their information", inputSchema: { type: "object", properties: { include: { type: "string", description: "Attributes to include: 'network' (optional)", enum: ["network"], }, network: { type: "string", description: "Network ID to filter by (optional, e.g., 'eth', 'bsc', 'polygon_pos')", }, }, required: [], }, },
  • src/index.js:1104-1109 (registration)
    Dispatch/registration in the MCP server's callTool request handler switch statement.
    case TOOL_NAMES.GET_RECENTLY_UPDATED_TOKENS: result = await toolService.getRecentlyUpdatedTokens({ include: args.include, network: args.network, }); break;
  • src/constants.js:34-34 (registration)
    Constant definition for the tool name used throughout the codebase.
    GET_RECENTLY_UPDATED_TOKENS: "get_recently_updated_tokens",

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/edkdev/defi-trading-mcp'

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