Skip to main content
Glama
zarelli1

MCP DeFiLlama Airdrops

by zarelli1

filter_airdrops

Filter cryptocurrency airdrops by minimum value, status, blockchain, or search terms using advanced criteria from DeFiLlama data. Streamline tracking and analysis for efficient decision-making.

Instructions

Filtrar airdrops por critérios específicos

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
chainNoFiltrar por blockchain
minValueNoValor mínimo estimado do airdrop
searchTermNoBuscar por termo no nome ou descrição
statusNoStatus do airdrop (Active, Ended, TBD, etc.)

Implementation Reference

  • The handler function for the filter_airdrops tool. It filters the cached airdrops list using status, chain, and searchTerm parameters (minValue is accepted but not applied in filtering), and returns a JSON-formatted response with the filtered results.
    private async filterAirdrops(args: { minValue?: number; status?: string; chain?: string; searchTerm?: string }) {
      // Garantir que temos dados
      if (this.cachedAirdrops.length === 0) {
        await this.getAirdrops({ forceRefresh: true });
      }
    
      let filtered = [...this.cachedAirdrops];
    
      if (args.status) {
        filtered = filtered.filter(a => a.status?.toLowerCase().includes(args.status!.toLowerCase()));
      }
    
      if (args.chain) {
        filtered = filtered.filter(a => a.chain?.toLowerCase().includes(args.chain!.toLowerCase()));
      }
    
      if (args.searchTerm) {
        const term = args.searchTerm.toLowerCase();
        filtered = filtered.filter(a => 
          a.name.toLowerCase().includes(term) ||
          a.description?.toLowerCase().includes(term)
        );
      }
    
      return {
        content: [
          {
            type: 'text',
            text: JSON.stringify({
              total: filtered.length,
              filters: args,
              airdrops: filtered
            }, null, 2)
          }
        ]
      };
    }
  • Input schema defining the parameters for the filter_airdrops tool: minValue (number), status (string), chain (string), searchTerm (string).
    inputSchema: {
      type: 'object',
      properties: {
        minValue: {
          type: 'number',
          description: 'Valor mínimo estimado do airdrop'
        },
        status: {
          type: 'string',
          description: 'Status do airdrop (Active, Ended, TBD, etc.)'
        },
        chain: {
          type: 'string',
          description: 'Filtrar por blockchain'
        },
        searchTerm: {
          type: 'string',
          description: 'Buscar por termo no nome ou descrição'
        }
      }
    }
  • src/index.ts:63-87 (registration)
    Tool registration in the ListTools handler, including name, description, and input schema.
    {
      name: 'filter_airdrops',
      description: 'Filtrar airdrops por critérios específicos',
      inputSchema: {
        type: 'object',
        properties: {
          minValue: {
            type: 'number',
            description: 'Valor mínimo estimado do airdrop'
          },
          status: {
            type: 'string',
            description: 'Status do airdrop (Active, Ended, TBD, etc.)'
          },
          chain: {
            type: 'string',
            description: 'Filtrar por blockchain'
          },
          searchTerm: {
            type: 'string',
            description: 'Buscar por termo no nome ou descrição'
          }
        }
      }
    },
  • src/index.ts:128-129 (registration)
    Dispatch to the filterAirdrops handler in the CallTool switch statement.
    case 'filter_airdrops':
      return await this.filterAirdrops(args as any);
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 but offers minimal information. It doesn't indicate whether this is a read-only operation, what permissions might be required, whether results are paginated, or what format the output takes. For a filtering tool with zero annotation coverage, this represents a significant gap in behavioral context.

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 extremely concise - a single Portuguese phrase that directly states the tool's function. There's zero wasted language or unnecessary elaboration. While it may be too brief for optimal utility, it represents perfect conciseness from a structural perspective.

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 that there's no output schema and no annotations, the description is insufficiently complete. A filtering tool with four parameters and no behavioral context needs more information about what the tool returns, how results are structured, and any limitations or constraints. The minimal description doesn't compensate for the lack of structured metadata.

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 input schema has 100% description coverage, with all four parameters clearly documented in the schema itself. The tool description adds no additional parameter information beyond what's already in the schema descriptions. According to scoring rules, when schema_description_coverage is high (>80%), the baseline is 3 even with no param info in the description.

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 'Filtrar airdrops por critérios específicos' clearly states the tool's purpose as filtering airdrops by specific criteria, which is a specific verb+resource combination. However, it doesn't distinguish this tool from its sibling 'get_airdrops' or 'get_best_airdrops' - both of which likely also retrieve airdrops, making the differentiation unclear. The description avoids tautology but lacks sibling distinction.

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. There's no mention of when this filtering tool should be preferred over 'get_airdrops' or 'get_best_airdrops', nor any context about prerequisites or typical use cases. The agent receives no usage differentiation between these similar-sounding tools.

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

Related 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/zarelli1/mcp-defillama-airdrops'

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