Skip to main content
Glama
coinpaprika

DexPaprika (CoinPaprika)

Official

getPoolDetails

Retrieve detailed liquidity pool information including token pairs, reserves, and trading metrics for DeFi analysis on supported blockchains.

Instructions

Get detailed information about a specific pool. Requires network ID from getNetworks and a pool address.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
networkYesNetwork ID from getNetworks (e.g., "ethereum", "solana")
poolAddressYesPool address or identifier
inversedNoWhether to invert the price ratio

Implementation Reference

  • The handler function that executes the tool logic: fetches detailed pool information from the DexPaprika API using the provided network and pool address, optionally inverting the price ratio, and formats the response for MCP.
    async ({ network, poolAddress, inversed }) => {
      const data = await fetchFromAPI(`/networks/${network}/pools/${poolAddress}?inversed=${inversed}`);
      return formatMcpResponse(data);
    }
  • Zod schema defining the input parameters for the getPoolDetails tool: required network ID, pool address, and optional inversed flag.
    {
      network: z.string().describe('Network ID from getNetworks (e.g., "ethereum", "solana")'),
      poolAddress: z.string().describe('Pool address or identifier'),
      inversed: z.boolean().optional().default(false).describe('Whether to invert the price ratio')
    },
  • src/index.js:139-151 (registration)
    Registration of the getPoolDetails tool on the MCP server, including name, description, input schema, and handler function.
    server.tool(
      'getPoolDetails',
      'Get detailed information about a specific pool. Requires network ID from getNetworks and a pool address.',
      {
        network: z.string().describe('Network ID from getNetworks (e.g., "ethereum", "solana")'),
        poolAddress: z.string().describe('Pool address or identifier'),
        inversed: z.boolean().optional().default(false).describe('Whether to invert the price ratio')
      },
      async ({ network, poolAddress, inversed }) => {
        const data = await fetchFromAPI(`/networks/${network}/pools/${poolAddress}?inversed=${inversed}`);
        return formatMcpResponse(data);
      }
    );
  • Shared helper function used by getPoolDetails (and other tools) to format the API response into MCP-compatible structure.
    function formatMcpResponse(data) {
      return {
        content: [
          {
            type: "text",
            text: JSON.stringify(data)
          }
        ]
      };
    }
  • Shared helper function used by the handler to make API requests to DexPaprika, handling specific error cases 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;
      }
    }
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 mentions a requirement ('Requires network ID from getNetworks') but doesn't cover other behavioral aspects like whether this is a read-only operation, potential rate limits, error conditions, or what the detailed information includes. For a tool with no annotation coverage, this leaves significant gaps in understanding its behavior.

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 two concise sentences with zero waste: the first states the purpose, and the second provides usage context. It's appropriately sized and front-loaded, making it easy to parse quickly.

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 no annotations and no output schema, the description is incomplete for a tool that retrieves 'detailed information'. It doesn't specify what details are included, the format of the response, or any behavioral constraints. However, the purpose and basic usage are clear, making it minimally viable but with notable gaps in 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 adds minimal value by mentioning 'network ID from getNetworks' and 'pool address', which slightly reinforces the schema but doesn't provide additional semantics beyond it. 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 verb 'Get' and resource 'detailed information about a specific pool', which is specific and actionable. However, it doesn't explicitly differentiate from siblings like getPoolOHLCV or getPoolTransactions, which also retrieve pool-related data but for different aspects.

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

Usage Guidelines4/5

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

The description provides clear context by stating 'Requires network ID from getNetworks', which implicitly guides usage by indicating a prerequisite tool. It doesn't explicitly mention when not to use this tool or name alternatives among siblings, but the context is sufficient for basic guidance.

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