Skip to main content
Glama

getNetworkPools

Retrieve top liquidity pools for a specific blockchain network to analyze trading volumes, prices, and pool metrics.

Instructions

PRIMARY POOL FUNCTION: Get top liquidity pools on a specific network. This is the MAIN way to get pool data - there is NO global pools function. Use this instead of any "getTopPools" or "getAllPools" concepts.

Input Schema

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

Implementation Reference

  • The handler function for getNetworkPools tool. Fetches top liquidity pools data from DexPaprika API for a specific network and formats the response.
    async ({ network, page, limit, sort, orderBy }) => {
      const data = await fetchFromAPI(`/networks/${network}/pools?page=${page}&limit=${limit}&sort=${sort}&order_by=${orderBy}`);
      return formatMcpResponse(data);
    }
  • Input schema/validation for the getNetworkPools tool using Zod, defining parameters like network, pagination, sorting.
    {
      network: z.string().describe('Network ID from getNetworks (required) - e.g., "ethereum", "solana"'),
      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:98-112 (registration)
    Registration of the getNetworkPools tool on the MCP server using server.tool(), including name, description, schema, and handler.
    server.tool(
      'getNetworkPools',
      'PRIMARY POOL FUNCTION: Get top liquidity pools on a specific network. This is the MAIN way to get pool data - there is NO global pools function. Use this instead of any "getTopPools" or "getAllPools" concepts.',
      {
        network: z.string().describe('Network ID from getNetworks (required) - e.g., "ethereum", "solana"'),
        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, page, limit, sort, orderBy }) => {
        const data = await fetchFromAPI(`/networks/${network}/pools?page=${page}&limit=${limit}&sort=${sort}&order_by=${orderBy}`);
        return formatMcpResponse(data);
      }
    );
  • Helper function to fetch data from DexPaprika API endpoints, handles errors like 410 (deprecated) and 429 (rate limit). Used by getNetworkPools handler.
    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 response data into MCP-compatible response structure. Used by getNetworkPools handler.
    function formatMcpResponse(data) {
      return {
        content: [
          {
            type: "text",
            text: JSON.stringify(data)
          }
        ]
      };
    }
Behavior3/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. It mentions this is for 'top liquidity pools' and implies pagination via context, but doesn't disclose key behavioral traits like rate limits, authentication needs, error handling, or what 'top' means (e.g., by volume, activity). The description adds some context about network specificity but lacks details on mutation safety or response format.

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 front-loaded with the primary function in the first sentence, followed by usage guidance. It uses two concise sentences with zero waste—every phrase earns its place by clarifying purpose and distinguishing from alternatives, making it highly efficient and well-structured.

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

Completeness4/5

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

Given the tool's moderate complexity (5 parameters, no output schema, no annotations), the description is fairly complete: it covers the core purpose and usage guidelines. However, it lacks details on behavioral aspects like what data is returned or error conditions, which would be helpful since there's no output schema. It's adequate but has minor gaps in full context.

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 the schema already documents all parameters thoroughly. The description doesn't add any parameter-specific semantics beyond what's in the schema (e.g., it doesn't explain 'network' beyond being required or clarify 'page'/'limit' usage). With high schema coverage, the baseline score of 3 is appropriate as the description doesn't compensate but doesn't detract.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states the verb ('Get') and resource ('top liquidity pools on a specific network'), making the purpose specific. It explicitly distinguishes this tool from potential alternatives like 'getTopPools' or 'getAllPools' by stating this is the 'MAIN way to get pool data' and there is 'NO global pools function', which effectively differentiates it from sibling tools.

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 versus alternatives: it states 'Use this instead of any "getTopPools" or "getAllPools" concepts' and emphasizes it's the 'MAIN way to get pool data'. This gives clear direction on tool selection, though it doesn't mention specific sibling tools like getDexPools or getTokenPools, the general exclusion is well-defined.

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