Skip to main content
Glama

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);

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