Skip to main content
Glama
coinpaprika

DexPaprika (CoinPaprika)

Official

getDexPools

Retrieve liquidity pools from a specific decentralized exchange (DEX) on a blockchain network to analyze trading activity and token performance.

Instructions

Get pools from a specific DEX on a network. First use getNetworks, then getNetworkDexes to find valid DEX IDs.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
networkYesNetwork ID from getNetworks (e.g., "ethereum", "solana")
dexYesDEX identifier from getNetworkDexes (e.g., "uniswap_v3")
pageNoPage number for pagination
limitNoNumber of items per page (max 100)
sortNoSort orderdesc
orderByNoField to order byvolume_usd

Implementation Reference

  • Handler function that fetches pool data from a specific DEX on a given network using the DexPaprika API and formats the response for MCP.
    async ({ network, dex, page, limit, sort, orderBy }) => {
      const data = await fetchFromAPI(`/networks/${network}/dexes/${dex}/pools?page=${page}&limit=${limit}&sort=${sort}&order_by=${orderBy}`);
      return formatMcpResponse(data);
    }
  • Zod schema defining the input parameters for the getDexPools tool.
    {
      network: z.string().describe('Network ID from getNetworks (e.g., "ethereum", "solana")'),
      dex: z.string().describe('DEX identifier from getNetworkDexes (e.g., "uniswap_v3")'),
      page: z.number().optional().default(0).describe('Page number for pagination'),
      limit: z.number().optional().default(10).describe('Number of items per page (max 100)'),
      sort: z.enum(['asc', 'desc']).optional().default('desc').describe('Sort order'),
      orderBy: z.enum(['volume_usd', 'price_usd', 'transactions', 'last_price_change_usd_24h', 'created_at']).optional().default('volume_usd').describe('Field to order by')
    },
  • src/index.js:121-136 (registration)
    Full registration of the getDexPools tool on the MCP server, including name, description, schema, and handler.
    server.tool(
      'getDexPools',
      'Get pools from a specific DEX on a network. First use getNetworks, then getNetworkDexes to find valid DEX IDs.',
      {
        network: z.string().describe('Network ID from getNetworks (e.g., "ethereum", "solana")'),
        dex: z.string().describe('DEX identifier from getNetworkDexes (e.g., "uniswap_v3")'),
        page: z.number().optional().default(0).describe('Page number for pagination'),
        limit: z.number().optional().default(10).describe('Number of items per page (max 100)'),
        sort: z.enum(['asc', 'desc']).optional().default('desc').describe('Sort order'),
        orderBy: z.enum(['volume_usd', 'price_usd', 'transactions', 'last_price_change_usd_24h', 'created_at']).optional().default('volume_usd').describe('Field to order by')
      },
      async ({ network, dex, page, limit, sort, orderBy }) => {
        const data = await fetchFromAPI(`/networks/${network}/dexes/${dex}/pools?page=${page}&limit=${limit}&sort=${sort}&order_by=${orderBy}`);
        return formatMcpResponse(data);
      }
    );
  • Helper function to fetch data from the DexPaprika API, handling errors like rate limits and deprecated endpoints.
    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 to format API responses in the MCP expected format.
    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?

With no annotations provided, the description carries the full burden of behavioral disclosure. While it mentions the prerequisite tools, it doesn't describe what 'Get pools' actually returns (e.g., pool metadata, liquidity data), whether there are rate limits, authentication requirements, or pagination behavior beyond what's in the schema. For a tool with 6 parameters and no annotation coverage, this is insufficient.

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 with just two sentences that both earn their place. The first sentence states the core purpose, and the second provides crucial usage guidance. There's no wasted verbiage or redundant information.

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?

For a tool with 6 parameters, no annotations, and no output schema, the description is incomplete. While it provides good usage guidance, it lacks information about what the tool returns, error conditions, or behavioral characteristics. The agent would need to guess about the response format and operational constraints.

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?

Schema description coverage is 100%, so all parameters are documented in the schema. The description adds minimal value beyond the schema by mentioning the prerequisite tools for network and dex parameters, but doesn't provide additional context about parameter interactions or usage patterns. This meets the baseline for high schema coverage.

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 pools') and resource ('from a specific DEX on a network'), making the purpose understandable. However, it doesn't explicitly differentiate from sibling tools like getNetworkPools or getTokenPools, which appear to serve similar pool-related functions.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines5/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description provides explicit guidance on when to use this tool: 'First use getNetworks, then getNetworkDexes to find valid DEX IDs.' This creates a clear prerequisite workflow and distinguishes it from other pool-related tools by emphasizing the DEX-specific filtering requirement.

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