Skip to main content
Glama

getStats

Retrieve comprehensive statistics for the DexPaprika ecosystem, including total networks, DEXes, pools, and tokens available across multiple blockchains.

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:250-258 (registration)
    Registration of the 'getStats' MCP tool using server.tool(). Defines empty input schema (no parameters), description, 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);
      }
    );
  • Handler function for the getStats tool. Fetches stats data from the DexPaprika '/stats' API endpoint and formats it for MCP response.
    async () => {
      const data = await fetchFromAPI('/stats');
      return formatMcpResponse(data);
    }
  • Shared helper function used by getStats (and other tools) to make API requests to DexPaprika, with custom error handling for deprecated endpoints (410) and rate limits (429).
    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;
      }
    }
  • Shared helper function used by getStats (and other tools) to format raw API data into the standard MCP response format with JSON string in text content.
    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 the full burden of behavioral disclosure. It states what data is retrieved but doesn't describe behavioral traits such as whether it's a read-only operation, potential rate limits, authentication needs, data freshness, or error handling. For a tool with zero annotation coverage, this is a significant gap in transparency.

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 resource and data points. Every word earns its place with no redundancy or waste, making it highly 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's simplicity (0 parameters, no output schema, no annotations), the description is adequate but has clear gaps. It explains what data is retrieved but lacks context on behavioral aspects (e.g., read-only nature, performance). Without annotations or output schema, the description should ideally provide more completeness for safe agent use, but it meets minimum viability.

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 there are no parameters to document. The description doesn't need to add parameter semantics beyond the schema, but it appropriately doesn't mention any parameters. Baseline 4 is applied as per rules for 0 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 tool's purpose with a specific verb ('Get') and resource ('high-level statistics about the DexPaprika ecosystem'), including what statistics are retrieved (total networks, DEXes, pools, and tokens). It distinguishes from siblings by focusing on aggregated ecosystem statistics rather than specific entities like individual networks, pools, or tokens. However, it doesn't explicitly differentiate from all siblings (e.g., 'getNetworks' might overlap conceptually).

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 prerequisites, appropriate contexts, or compare it to sibling tools like 'getNetworks' (which might list networks without statistics) or 'search' (which might filter data). Usage is implied by the purpose but not explicitly stated.

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

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