Skip to main content
Glama
edkdev

DeFi Trading Agent MCP Server

by edkdev

get_recently_updated_tokens

Retrieve recently updated token information for DeFi trading analysis, with optional network filtering to support cross-chain portfolio decisions.

Instructions

Get recently updated tokens with their information

Input Schema

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

Implementation Reference

  • The primary handler function for the 'get_recently_updated_tokens' tool. It calls the CoinGecko API service and formats the response for the MCP protocol.
    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(",") : [],
      };
    }
  • The tool schema definition including name, description, and input schema for validation in the MCP ListTools response.
    {
      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)
    The switch case registration that routes CallTool requests for 'get_recently_updated_tokens' to the toolService handler.
    case TOOL_NAMES.GET_RECENTLY_UPDATED_TOKENS:
      result = await toolService.getRecentlyUpdatedTokens({
        include: args.include,
        network: args.network,
      });
      break;
  • The underlying API service method that performs the actual HTTP request to CoinGecko's /tokens/info_recently_updated endpoint.
    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}`);
      }
    }
  • Constant definition mapping the tool name enum to the string 'get_recently_updated_tokens' used throughout the codebase.
    GET_RECENTLY_UPDATED_TOKENS: "get_recently_updated_tokens",
Behavior2/5

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

With no annotations provided, the description carries the full burden of behavioral disclosure. It states the tool retrieves data ('Get'), implying a read-only operation, but doesn't specify aspects like rate limits, authentication needs, pagination, or what 'recently updated' entails (e.g., last hour, day). This is a significant gap for a tool with potential behavioral nuances.

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 directly states the tool's purpose without unnecessary words. It's front-loaded with the core action and resource, making it easy to parse quickly. Every word earns its place.

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 the complexity of retrieving 'recently updated tokens' (which implies temporal and possibly other filters), no annotations, and no output schema, the description is incomplete. It lacks details on what information is returned, how 'recently updated' is defined, and behavioral traits like pagination or rate limits, leaving gaps for effective tool use.

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

Parameters3/5

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

The schema description coverage is 100%, so the schema already documents both parameters (include and network) with descriptions and an enum. The description adds no additional parameter semantics beyond what's in the schema, such as clarifying the meaning of 'recently updated' in relation to the network filter. Baseline 3 is appropriate when the schema handles parameter documentation.

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 verb 'Get' and the resource 'recently updated tokens with their information', making the purpose understandable. However, it doesn't distinguish this tool from similar sibling tools like get_token_data, get_token_info, or get_multiple_tokens_data, which all retrieve token information but with different scopes or filters.

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. It doesn't mention what 'recently updated' means (e.g., time frame), how it differs from other token retrieval tools in the sibling list, or any prerequisites for usage. This leaves the agent without context for tool selection.

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

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