Skip to main content
Glama
zarelli1

MCP DeFiLlama Airdrops

by zarelli1

debug_scraper

Verify and debug the scraping functionality to ensure accurate retrieval of cryptocurrency airdrop data from DeFiLlama, supporting seamless integration with automation workflows.

Instructions

Debugar o scraper para verificar se está funcionando corretamente

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Implementation Reference

  • The primary handler function for the 'debug_scraper' tool. It invokes the scraper's debugPage method, formats the result as MCP content, and handles errors.
    private async debugScraper() {
      try {
        const debugInfo = await this.scraper.debugPage();
        return {
          content: [
            {
              type: 'text',
              text: `Debug Info:\n${debugInfo}`
            }
          ]
        };
      } catch (error) {
        return {
          content: [
            {
              type: 'text',
              text: `Erro no debug: ${error}`
            }
          ]
        };
      }
    }
  • The input schema definition for the 'debug_scraper' tool, registered in the ListTools handler. It takes no parameters.
    {
      name: 'debug_scraper',
      description: 'Debugar o scraper para verificar se está funcionando corretamente',
      inputSchema: {
        type: 'object',
        properties: {}
      }
    }
  • src/index.ts:134-136 (registration)
    The switch case in the CallToolRequestSchema handler that routes requests for 'debug_scraper' to the debugScraper handler method.
    case 'debug_scraper':
      return await this.debugScraper();
  • The helper method in DeFiLlamaScraper that performs the actual debugging: fetches the airdrops page, parses with cheerio, extracts structural info, and returns JSON details for debugging the scraper.
    async debugPage(): Promise<string> {
      try {
        console.log('Fazendo debug da página...');
        const response = await this.axiosInstance.get('https://defillama.com/airdrops');
        const $ = cheerio.load(response.data);
    
        const pageInfo = {
          title: $('title').text(),
          url: 'https://defillama.com/airdrops',
          status: response.status,
          headers: response.headers['content-type'],
          bodyLength: response.data.length,
          elementCounts: {
            total: $('*').length,
            tables: $('table').length,
            divs: $('div').length,
            links: $('a').length,
            rows: $('tr').length
          },
          sampleText: $('body').text().slice(0, 500),
          foundStructures: {
            tableRows: $('table tbody tr').length,
            airdropElements: $('[class*="airdrop"]').length,
            itemElements: $('[class*="item"]').length
          }
        };
    
        return JSON.stringify(pageInfo, null, 2);
      } catch (error) {
        return `Erro no debug: ${error}`;
      }
    }
Behavior2/5

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

No annotations are provided, so the description carries the full burden of behavioral disclosure. It mentions debugging to verify correct functioning, which implies a read-only or diagnostic operation, but doesn't specify if it's safe, destructive, requires authentication, or has rate limits. The description is too vague to fully inform the agent about behavioral traits.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is a single, efficient sentence that states the purpose clearly. It's appropriately sized for a tool with no parameters, with no wasted words. However, it could be more front-loaded with additional context, but it's concise and well-structured.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness3/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given the tool has no parameters, no annotations, and no output schema, the description is minimally adequate. It explains what the tool does (debugging a scraper), but lacks details on behavior, output, or integration with sibling tools. For a diagnostic tool with low complexity, it's complete enough but has clear gaps in guidance and transparency.

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

Parameters4/5

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

The tool has 0 parameters, and schema description coverage is 100%, so no parameter documentation is needed. The description doesn't add parameter semantics beyond the schema, but with no parameters, a baseline score of 4 is appropriate as it doesn't need to compensate for gaps.

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 states the tool's purpose as debugging a scraper to verify its correct functioning, which is clear but vague. It uses a specific verb ('debug') and resource ('scraper'), but doesn't differentiate from sibling tools (which are about airdrops, not scraping). The description is not tautological but lacks specificity about what 'debugging' entails.

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?

No guidance is provided on when to use this tool versus alternatives. The description implies usage for verifying scraper functionality, but it doesn't specify context, prerequisites, or exclusions. Without sibling tools related to scraping, there's no explicit comparison or when-not-to-use advice.

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