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
| Name | Required | Description | Default |
|---|---|---|---|
| include | No | Attributes to include: 'network' (optional) | |
| network | No | Network 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
- src/toolService.js:357-368 (handler)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_updatedasync 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}`); } }
- src/index.js:539-557 (schema)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",