Skip to main content
Glama
coinpaprika

DexPaprika (CoinPaprika)

Official

getStats

Retrieve comprehensive statistics for the DexPaprika ecosystem, including total networks, DEXes, pools, and tokens available to analyze DeFi market data.

Instructions

Get high-level statistics about the DexPaprika ecosystem: total networks, DEXes, pools, and tokens available.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Implementation Reference

  • src/index.js:256-264 (registration)
    Registers the 'getStats' MCP tool with empty input schema and inline handler function.
    server.tool(
      'getStats',
      'Get high-level statistics about the DexPaprika ecosystem: total networks, DEXes, pools, and tokens available.',
      {},
      async () => {
        const data = await fetchFromAPI('/stats');
        return formatMcpResponse(data);
      }
    );
  • The handler function for getStats tool: fetches stats from DexPaprika API '/stats' endpoint and formats the response for MCP.
    async () => {
      const data = await fetchFromAPI('/stats');
      return formatMcpResponse(data);
    }
  • Helper function used by getStats to fetch data from the DexPaprika API with comprehensive error handling.
    async function fetchFromAPI(endpoint) {
      try {
        const response = await fetch(`${API_BASE_URL}${endpoint}`);
        if (!response.ok) {
          if (response.status === 410) {
            throw new Error(
              'This endpoint has been permanently removed. Please use network-specific endpoints instead. ' +
              'For example, use /networks/{network}/pools instead of /pools. ' +
              'Get available networks first using the getNetworks function.'
            );
          }
          if (response.status === 429) {
            throw new Error(
              'Rate limit exceeded. You have reached the maximum number of requests allowed for the free tier. ' +
              'To increase your rate limits and access additional features, please consider upgrading to a paid plan at https://docs.dexpaprika.com/'
            );
          }
          throw new Error(`API request failed with status ${response.status}`);
        }
        return await response.json();
      } catch (error) {
        console.error(`Error fetching from API: ${error.message}`);
        throw error;
      }
    }
  • Helper function used by getStats to format the API response into MCP-compatible content structure.
    function formatMcpResponse(data) {
      return {
        content: [
          {
            type: "text",
            text: JSON.stringify(data)
          }
        ]
      };
    }
Behavior2/5

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

No annotations are provided, so the description carries full burden. It states the tool retrieves statistics but lacks behavioral details such as whether it's read-only (implied but not stated), data freshness, rate limits, authentication needs, or error handling. This is a significant gap for a tool with zero annotation coverage.

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 front-loads the core purpose ('Get high-level statistics') and specifies the data returned. There is zero waste, and every word contributes to understanding the tool's function.

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's simplicity (0 parameters, no output schema, no annotations), the description is adequate but has gaps. It explains what data is returned but not the format (e.g., JSON structure, units) or behavioral aspects. For a read-only stats tool, this is minimally viable but could be more complete by addressing output details.

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 input schema has 0 parameters with 100% coverage, so no parameter documentation is needed. The description appropriately adds no parameter information, focusing on the tool's purpose instead, which aligns with the baseline for zero parameters.

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 action ('Get') and resource ('high-level statistics about the DexPaprika ecosystem'), specifying what data is returned (total networks, DEXes, pools, and tokens). It distinguishes from siblings by focusing on aggregated ecosystem stats rather than specific entities like networks, pools, or tokens, though it doesn't explicitly name alternatives.

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 scenarios like needing overview data versus detailed information, or compare to siblings like 'getNetworks' for network lists or 'search' for specific queries, leaving usage context implied rather than explicit.

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/coinpaprika/dexpaprika-mcp'

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