Skip to main content
Glama
coinpaprika

DexPaprika (CoinPaprika)

Official

getPoolTransactions

Retrieve recent transaction data for a specific liquidity pool, including swaps, adds, and removes, to analyze trading activity and liquidity changes.

Instructions

Get recent transactions for a specific pool. Shows swaps, adds, removes. Requires network and pool address.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
networkYesNetwork ID from getNetworks (e.g., "ethereum", "solana")
poolAddressYesPool address or identifier
pageNoPage number for pagination (up to 100 pages)
limitNoNumber of items per page (max 100)
cursorNoTransaction ID used for cursor-based pagination

Implementation Reference

  • The handler function that constructs the DexPaprika API endpoint for retrieving transactions of a specific pool and fetches/formats the response.
    async ({ network, poolAddress, page, limit, cursor }) => {
      let endpoint = `/networks/${network}/pools/${poolAddress}/transactions?page=${page}&limit=${limit}`;
      if (cursor) {
        endpoint += `&cursor=${encodeURIComponent(cursor)}`;
      }
      const data = await fetchFromAPI(endpoint);
      return formatMcpResponse(data);
    }
  • Zod input schema defining parameters for the getPoolTransactions tool: network, poolAddress, page, limit, cursor.
    {
      network: z.string().describe('Network ID from getNetworks (e.g., "ethereum", "solana")'),
      poolAddress: z.string().describe('Pool address or identifier'),
      page: z.number().optional().default(0).describe('Page number for pagination (up to 100 pages)'),
      limit: z.number().optional().default(10).describe('Number of items per page (max 100)'),
      cursor: z.string().optional().describe('Transaction ID used for cursor-based pagination')
    },
  • src/index.js:218-236 (registration)
    Registration of the getPoolTransactions tool via server.tool(), including name, description, schema, and handler function.
    server.tool(
      'getPoolTransactions',
      'Get recent transactions for a specific pool. Shows swaps, adds, removes. Requires network and pool address.',
      {
        network: z.string().describe('Network ID from getNetworks (e.g., "ethereum", "solana")'),
        poolAddress: z.string().describe('Pool address or identifier'),
        page: z.number().optional().default(0).describe('Page number for pagination (up to 100 pages)'),
        limit: z.number().optional().default(10).describe('Number of items per page (max 100)'),
        cursor: z.string().optional().describe('Transaction ID used for cursor-based pagination')
      },
      async ({ network, poolAddress, page, limit, cursor }) => {
        let endpoint = `/networks/${network}/pools/${poolAddress}/transactions?page=${page}&limit=${limit}`;
        if (cursor) {
          endpoint += `&cursor=${encodeURIComponent(cursor)}`;
        }
        const data = await fetchFromAPI(endpoint);
        return formatMcpResponse(data);
      }
    );
  • Shared 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;
      }
    }
  • Shared helper 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?

With no annotations provided, the description carries full burden for behavioral disclosure. It mentions the requirement for network and pool address but lacks details on permissions, rate limits, error conditions, or what 'recent' means (time window). It also doesn't describe the return format or pagination behavior beyond what's implied by parameters.

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 (two sentences) with zero wasted words. It front-loads the core purpose and efficiently lists transaction types and requirements. Every sentence earns its place by providing essential 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 5 parameters, no annotations, and no output schema, the description is incomplete. It doesn't explain what the tool returns (transaction data structure), how pagination works with page/limit versus cursor, or behavioral aspects like rate limits. The agent would lack sufficient context to use this tool effectively without trial and error.

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 fully documents all 5 parameters. The description adds minimal value beyond the schema by mentioning that network and pool address are required, but doesn't provide additional context about parameter interactions or usage nuances. Baseline 3 is appropriate when schema does the heavy lifting.

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 recent transactions') and resource ('for a specific pool'), with specific transaction types enumerated ('shows swaps, adds, removes'). However, it doesn't explicitly differentiate from sibling tools like getPoolDetails or getPoolOHLCV, which also retrieve pool-related data but for different purposes.

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

Usage Guidelines3/5

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

The description implies usage context by stating 'Requires network and pool address', which are mandatory parameters, but doesn't provide explicit guidance on when to use this tool versus alternatives like getPoolDetails (for pool metadata) or getPoolOHLCV (for price data). No exclusions or specific scenarios are mentioned.

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